diff -up gridengine/source/dist/inst_sge.rctemplates gridengine/source/dist/inst_sge --- gridengine/source/dist/inst_sge.rctemplates 2009-12-07 10:11:51.000000000 -0700 +++ gridengine/source/dist/inst_sge 2010-08-25 11:56:12.828867053 -0600 @@ -695,8 +696,7 @@ if [ "$UPDATE" = true ]; then AddJMXFiles fi RestoreSequenceNumberFiles $QMDIR #Restore jobseqnum and arseqnum - CreateSGEStartUpScripts $euid true master - CreateSGEStartUpScripts $euid true execd + SetupDefaultUsers $euid CreateSettingsFile InitCA SetupRcScriptNames master #New qmaster RC script/SMF @@ -860,7 +860,6 @@ if [ "$BERKELEY" = "install" ]; then Makedir $COMMONDIR ProcessSGEClusterName "bdb" SetSpoolingOptions - AddSGEStartUpScript $euid "bdb" PrepareRPCServerStart GiveBerkelyHints else @@ -912,11 +911,9 @@ if [ "$QMASTER" = "install" -a "$UPDATE" AddDefaultUsersets AddCommonFiles AddJMXFiles - CreateSGEStartUpScripts $euid true master - CreateSGEStartUpScripts $euid true execd + SetupDefaultUsers $euid CreateSettingsFile InitCA - AddSGEStartUpScript $euid master StartQmaster AddWindowsAdmin AddHosts @@ -1084,7 +1081,6 @@ if [ "$EXECD" = "install" -a "$UPDATE" ! GetLocalExecdSpoolDir AddLocalConfiguration_With_Qconf AddSubmitHostsExecd - AddSGEStartUpScript $euid execd SetupWinSvc execinst #service install during execd installation -> param: execinst CopyIBMLoadSensor StartExecd @@ -1120,7 +1116,6 @@ if [ "$EXECD" = "install" -a "$UPDATE" ! CheckHostNameResolving install GetLocalExecdSpoolDir AddLocalConfiguration_With_Qconf - AddSGEStartUpScript $euid execd SetupWinSvc execinst #service install during execd installation -> param: execinst CopyIBMLoadSensor StartExecd @@ -1437,7 +1432,6 @@ if [ $SHADOW = "install" ]; then if [ $SHADOW_HOST = `$SGE_UTILBIN/gethostname -aname` ]; then . $SGE_ROOT/$SGE_CELL/common/settings.sh SGE_ARCH=`$SGE_ROOT/util/arch` - AddSGEStartUpScript $euid shadow $INFOTEXT "Starting sge_shadowd on host %s\n" $SHADOW_HOST $INFOTEXT -log "Starting sge_shadowd on host %s\n" $SHADOW_HOST if [ "$SGE_ENABLE_SMF" = "true" ]; then @@ -1683,20 +1677,7 @@ if [ $MAKE_RC = "true" ]; then COMMONDIR=$SGE_CELL/common - CreateSGEStartUpScripts 0 true master - CreateSGEStartUpScripts 0 true execd - - $INFOTEXT "\nYour new startup scripts are created. You will find them in the\n" \ - "directory:\n\n" \ - " %s\n\n" \ - "Your old startup scripts are saved in this directory as\n\n" \ - " %s\n" \ - " %s\n\n" \ - \$SGE_ROOT/$COMMONDIR sgemaster_$DATE sgeexecd_$DATE - - $INFOTEXT "Please now copy the new startup scripts to the system wide rc\n" \ - "file location on all qmaster, shadowd and execution hosts." - + SetupDefaultUser 0 fi exit 0 diff -up gridengine/source/dist/util/create_settings.sh.rctemplates gridengine/source/dist/util/create_settings.sh --- gridengine/source/dist/util/create_settings.sh.rctemplates 2008-02-08 04:57:29.000000000 -0700 +++ gridengine/source/dist/util/create_settings.sh 2010-08-25 11:56:12.662804900 -0600 @@ -67,8 +67,6 @@ SP_SH=$1/settings.sh echo "setenv SGE_ROOT $SGE_ROOT" > $SP_CSH echo "" >> $SP_CSH echo "set ARCH = \`\$SGE_ROOT/util/arch\`" >> $SP_CSH -echo "set DEFAULTMANPATH = \`\$SGE_ROOT/util/arch -m\`" >> $SP_CSH -echo "set MANTYPE = \`\$SGE_ROOT/util/arch -mt\`" >> $SP_CSH echo "" >> $SP_CSH #if [ "$SGE_CELL" != "" -a "$SGE_CELL" != "default" ]; then @@ -93,31 +91,9 @@ fi echo "" >> $SP_CSH -echo '# library path setting required only for architectures where RUNPATH is not supported' >> $SP_CSH -echo 'if ( $?MANPATH == 1 ) then' >> $SP_CSH -echo " setenv MANPATH \$SGE_ROOT/"'${MANTYPE}':'$MANPATH' >> $SP_CSH -echo "else" >> $SP_CSH -echo " setenv MANPATH \$SGE_ROOT/"'${MANTYPE}:$DEFAULTMANPATH' >> $SP_CSH -echo "endif" >> $SP_CSH -echo "" >> $SP_CSH echo "set path = ( \$SGE_ROOT/bin/"'$ARCH $path )' >> $SP_CSH -echo 'switch ($ARCH)' >> $SP_CSH -#ENFORCE_SHLIBPATH#echo 'case "sol*":' >> $SP_CSH -#ENFORCE_SHLIBPATH#echo 'case "lx*":' >> $SP_CSH -#ENFORCE_SHLIBPATH#echo 'case "hp11-64":' >> $SP_CSH -#ENFORCE_SHLIBPATH#echo ' breaksw' >> $SP_CSH -echo 'case "*":' >> $SP_CSH -echo " set shlib_path_name = \`\$SGE_ROOT/util/arch -lib\`" >> $SP_CSH -echo " if ( \`eval echo '\$?'\$shlib_path_name\` ) then" >> $SP_CSH -echo " set old_value = \`eval echo '\$'\$shlib_path_name\`" >> $SP_CSH -echo " setenv \$shlib_path_name \"\$SGE_ROOT/lib/\$ARCH\":\"\$old_value\"" >> $SP_CSH -echo " else" >> $SP_CSH -echo " setenv \$shlib_path_name \$SGE_ROOT/lib/\$ARCH" >> $SP_CSH -echo " endif" >> $SP_CSH -echo " unset shlib_path_name old_value" >> $SP_CSH -echo "endsw" >> $SP_CSH -echo "unset ARCH DEFAULTMANPATH MANTYPE" >> $SP_CSH +echo "unset ARCH" >> $SP_CSH # # bourne shell settings file @@ -126,8 +102,6 @@ echo "unset ARCH DEFAULTMANPATH MANTYPE" echo "SGE_ROOT=$SGE_ROOT; export SGE_ROOT" > $SP_SH echo "" >> $SP_SH echo "ARCH=\`\$SGE_ROOT/util/arch\`" >> $SP_SH -echo "DEFAULTMANPATH=\`\$SGE_ROOT/util/arch -m\`" >> $SP_SH -echo "MANTYPE=\`\$SGE_ROOT/util/arch -mt\`" >> $SP_SH echo "" >> $SP_SH if [ "$SGE_CELL" != "" ]; then @@ -151,28 +125,7 @@ fi echo "" >> $SP_SH -echo "if [ \"\$MANPATH\" = \"\" ]; then" >> $SP_SH -echo " MANPATH=\$DEFAULTMANPATH" >> $SP_SH -echo "fi" >> $SP_SH -echo "MANPATH=\$SGE_ROOT/\$MANTYPE:\$MANPATH; export MANPATH" >> $SP_SH -echo "" >> $SP_SH echo "PATH=\$SGE_ROOT/bin/\$ARCH:\$PATH; export PATH" >> $SP_SH -echo '# library path setting required only for architectures where RUNPATH is not supported' >> $SP_SH -echo 'case $ARCH in' >> $SP_SH -#ENFORCE_SHLIBPATH#echo 'sol*|lx*|hp11-64)' >> $SP_SH -#ENFORCE_SHLIBPATH#echo ' ;;' >> $SP_SH -echo '*)' >> $SP_SH -echo " shlib_path_name=\`\$SGE_ROOT/util/arch -lib\`" >> $SP_SH -echo " old_value=\`eval echo '\$'\$shlib_path_name\`" >> $SP_SH -echo " if [ x\$old_value = "x" ]; then" >> $SP_SH -echo " eval \$shlib_path_name=\$SGE_ROOT/lib/\$ARCH" >> $SP_SH -echo " else" >> $SP_SH -echo " eval \$shlib_path_name=\$SGE_ROOT/lib/\$ARCH:\$old_value" >> $SP_SH -echo " fi" >> $SP_SH -echo " export \$shlib_path_name" >> $SP_SH -echo ' unset shlib_path_name old_value' >> $SP_SH -echo ' ;;' >> $SP_SH -echo 'esac' >> $SP_SH -echo "unset ARCH DEFAULTMANPATH MANTYPE" >> $SP_SH +echo "unset ARCH" >> $SP_SH diff -up gridengine/source/dist/util/install_modules/inst_common.sh.rctemplates gridengine/source/dist/util/install_modules/inst_common.sh --- gridengine/source/dist/util/install_modules/inst_common.sh.rctemplates 2010-08-25 11:56:12.639807647 -0600 +++ gridengine/source/dist/util/install_modules/inst_common.sh 2010-08-25 11:56:42.315866389 -0600 @@ -570,19 +570,16 @@ ErrUsage() # GetConfigFromFile() { - SGE_ENABLE_SMF_LAST=$SGE_ENABLE_SMF - SGE_ENABLE_SMF="" + SGE_ENABLE_SMF_LAST=$SGE_ENABLE_SMF + SGE_ENABLE_SMF="" + + if [ $FILE != "undef" ]; then + $INFOTEXT "Reading configuration from file %s" $FILE + . $FILE + else + $INFOTEXT "No config file. Please, start the installation with\n a valid configuration file" + fi - IFS=" -" - if [ $FILE != "undef" ]; then - $INFOTEXT "Reading configuration from file %s" $FILE - . $FILE - else - $INFOTEXT "No config file. Please, start the installation with\n a valid configuration file" - fi - IFS=" -" #-nosmf takes precedence over the value in the autoinstall template if [ "$SGE_ENABLE_SMF_LAST" = false ]; then SGE_ENABLE_SMF=false @@ -2367,14 +2364,6 @@ CreateSGEStartUpScripts() rm -f $TMP_SGE_STARTUP_FILE ${TMP_SGE_STARTUP_FILE}.0 ${TMP_SGE_STARTUP_FILE}.1 - if [ $euid = 0 -a "$ADMINUSER" != default -a $QMASTER = "install" -a $hosttype = "master" ]; then - AddDefaultManager root $ADMINUSER - AddDefaultOperator $ADMINUSER - elif [ $euid != 0 -a $hosttype = "master" ]; then - AddDefaultManager $USER - AddDefaultOperator $USER - fi - $INFOTEXT "Creating >%s< script" $STARTUP_FILE_NAME fi @@ -2382,6 +2371,22 @@ CreateSGEStartUpScripts() #------------------------------------------------------------------------- +# SetupDefaultUsers: Add the default manager and operator +# +SetupDefaultUsers() { + euid=$1 + + if [ $euid = 0 -a "$ADMINUSER" != default -a $QMASTER = "install" ]; then + AddDefaultManager root $ADMINUSER + AddDefaultOperator $ADMINUSER + elif [ $euid != 0 ]; then + AddDefaultManager $USER + AddDefaultOperator $USER + fi +} + + +#------------------------------------------------------------------------- # AddSGEStartUpScript: Add startup script to rc files if root installs # AddSGEStartUpScript() diff -up gridengine/source/dist/util/install_modules/inst_execd.sh.rctemplates gridengine/source/dist/util/install_modules/inst_execd.sh --- gridengine/source/dist/util/install_modules/inst_execd.sh.rctemplates 2010-08-25 11:56:12.546804323 -0600 +++ gridengine/source/dist/util/install_modules/inst_execd.sh 2010-08-25 11:56:12.677807416 -0600 @@ -457,7 +457,7 @@ StartExecd() exit 1 fi else - $SGE_STARTUP_FILE + /sbin/service sge_execd start fi $INFOTEXT -wait -auto $AUTO -n "\nHit <RETURN> to continue >> " $CLEAR diff -up gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates gridengine/source/dist/util/install_modules/inst_qmaster.sh --- gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates 2010-08-25 11:56:12.587804590 -0600 +++ gridengine/source/dist/util/install_modules/inst_qmaster.sh 2010-08-25 11:56:12.683807289 -0600 @@ -208,8 +208,8 @@ GetQmasterSpoolDir() "the qmaster daemon on other hosts (see the corresponding section in the\n" \ "Grid Engine Installation and Administration Manual for details) the account\n" \ "on the shadow master hosts also needs read/write access to this directory.\n\n" \ - "Enter a qmaster spool directory [%s] >> " "$SGE_ROOT_VAL/$SGE_CELL_VAL/spool/qmaster" - QMDIR=`Enter "$SGE_ROOT_VAL/$SGE_CELL_VAL/spool/qmaster"` + "Enter a qmaster spool directory [%s] >> " "/var/spool/gridengine/$SGE_CELL_VAL/spool/qmaster" + QMDIR=`Enter "/var/spool/gridengine/$SGE_CELL_VAL/spool/qmaster"` done=true #If directory is not empty need now require a new one if [ -d "$QMDIR" ]; then @@ -733,6 +733,9 @@ AddBootstrap() ExecuteAsAdmin chmod 666 $COMMONDIR/bootstrap PrintBootstrap >> $COMMONDIR/bootstrap ExecuteAsAdmin chmod 444 $COMMONDIR/bootstrap + rm -f /etc/sysconfig/gridengine + echo "SGE_ROOT=/usr/share/gridengine" >> /etc/sysconfig/gridengine + echo "SGE_CELL=$SGE_CELL" >> /etc/sysconfig/gridengine } #------------------------------------------------------------------------- @@ -949,7 +952,7 @@ GetConfiguration() fi if [ -z "$1" ]; then - default_value=$SGE_ROOT_VAL/$SGE_CELL_VAL/spool + default_value=/var/spool/gridengine/$SGE_CELL_VAL else default_value="$1" fi @@ -1192,6 +1195,7 @@ InitSysKs() touch /tmp/pwfile.$$ chmod 600 /tmp/pwfile.$$ echo "$SGE_JMX_SSL_KEYSTORE_PW" > /tmp/pwfile.$$ + ExecuteAsAdmin mkdir -p `dirname $SGE_JMX_SSL_KEYSTORE` OUTPUT=`$SGE_CA_CMD -sysks -ksout $SGE_JMX_SSL_KEYSTORE -kspwf /tmp/pwfile.$$ 2>&1` if [ $? != 0 ]; then $INFOTEXT "Error: Cannot create keystore $SGE_JMX_SSL_KEYSTORE\n$OUTPUT" @@ -1263,7 +1267,7 @@ StartQmaster() exit 1 fi else - $SGE_STARTUP_FILE -qmaster + /sbin/service sgemaster start if [ $? -ne 0 ]; then $INFOTEXT "sge_qmaster start problem" $INFOTEXT -log "sge_qmaster start problem" diff -up gridengine/source/scripts/distinst.rctemplates gridengine/source/scripts/distinst --- gridengine/source/scripts/distinst.rctemplates 2009-11-12 15:51:14.000000000 -0700 +++ gridengine/source/scripts/distinst 2010-08-25 11:56:12.914806641 -0600 @@ -832,15 +832,9 @@ if [ $instcommon = true ]; then Execute cp libs/jgdi/util/logging.properties.template $DEST_SGE_ROOT/util if [ $enforce_shlibpath = true ]; then Execute grep -v "#ENFORCE_SHLIBPATH#" dist/util/create_settings.sh > $DEST_SGE_ROOT/util/create_settings.sh - Execute grep -v "#ENFORCE_SHLIBPATH#" dist/util/rctemplates/sgemaster_template > $DEST_SGE_ROOT/util/rctemplates/sgemaster_template - Execute grep -v "#ENFORCE_SHLIBPATH#" dist/util/rctemplates/sgeexecd_template > $DEST_SGE_ROOT/util/rctemplates/sgeexecd_template - Execute grep -v "#ENFORCE_SHLIBPATH#" dist/util/rctemplates/sgebdb_template > $DEST_SGE_ROOT/util/rctemplates/sgebdb_template Execute grep -v "#ENFORCE_SHLIBPATH#" dist/util/install_modules/inst_common.sh > $DEST_SGE_ROOT/util/install_modules/inst_common.sh else Execute sed -e "s/#ENFORCE_SHLIBPATH#//" dist/util/create_settings.sh > $DEST_SGE_ROOT/util/create_settings.sh - Execute sed -e "s/#ENFORCE_SHLIBPATH#//" dist/util/rctemplates/sgemaster_template > $DEST_SGE_ROOT/util/rctemplates/sgemaster_template - Execute sed -e "s/#ENFORCE_SHLIBPATH#//" dist/util/rctemplates/sgeexecd_template > $DEST_SGE_ROOT/util/rctemplates/sgeexecd_template - Execute sed -e "s/#ENFORCE_SHLIBPATH#//" dist/util/rctemplates/sgebdb_template > $DEST_SGE_ROOT/util/rctemplates/sgebdb_template Execute sed -e "s/#ENFORCE_SHLIBPATH#//" dist/util/install_modules/inst_common.sh > $DEST_SGE_ROOT/util/install_modules/inst_common.sh fi @@ -869,7 +863,6 @@ if [ $instcommon = true ]; then Execute chmod 755 $DEST_SGE_ROOT/util/install_modules \ $DEST_SGE_ROOT/util/upgrade_modules \ - $DEST_SGE_ROOT/util/rctemplates \ $DEST_SGE_ROOT/util/resources \ $DEST_SGE_ROOT/util/sgeCA \ $DEST_SGE_ROOT/util/resources/calendars \ @@ -894,7 +887,6 @@ if [ $instcommon = true ]; then $DEST_SGE_ROOT/util/resources/starter_methods/* Execute chmod 644 $DEST_SGE_ROOT/util/install_modules/* \ - $DEST_SGE_ROOT/util/rctemplates/* \ $DEST_SGE_ROOT/util/sgeCA/*.cnf \ $DEST_SGE_ROOT/util/sgeSMF/*.xml \ $DEST_SGE_ROOT/util/sgeSMF/sge_smf_support.sh \