Annoying errors in init script under RHEL6 (bad devtoolset2 check).

This commit is contained in:
Jean-Paul Chaput 2015-06-12 15:22:16 +02:00
parent 5d3d7343b0
commit 39567add06
2 changed files with 8 additions and 3 deletions

View File

@ -116,7 +116,7 @@ def guessOs ():
print " (using: \"%s\")" % osType
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
if not ldLibraryPath or 'devtoolset' in ldLibraryPath: useDevtoolset2 = False
if 'devtoolset' in ldLibraryPath: useDevtoolset2 = False
if libDir == 'lib64' and not os.path.exists('/usr/lib64'):
libDir = 'lib'

View File

@ -95,10 +95,15 @@ if scriptBinPath == '/usr/bin':
location = Location.BaseSystem
coriolisTop = '/usr'
print ' Using standard system installation scheme.'
elif scriptBinPath == '/opt/rh/devtoolset-2/root/usr/bin':
elif scriptBinPath == '/soc/coriolis2/bin':
location = Location.Devtoolset2
coriolisTop = '/opt/rh/devtoolset-2/root/usr'
coriolisTop = '/soc/coriolis2'
print ' Using RHEL6 installation scheme.'
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
if not 'devtoolset' in ldLibraryPath:
print '[ERROR] You must enable the devtoolset-2 before running Coriolis:'
print ' > scl enable devtoolset-2 bash'
sys.exit( 1 )
else:
location = Location.UserDefined
coriolisTop = truncPath( scriptBinPath, 0, -1 )