@@ -2229,40 +2229,49 @@ InstallRcScript()
2229
2229
elif [ " $RC_FILE " = " sysv_rc" ]; then
2230
2230
$INFOTEXT " Installing startup script %s and %s" " $RC_PREFIX /$RC_DIR /$S95NAME " " $RC_PREFIX /$RC_DIR /$K03NAME "
2231
2231
# On newer Linux distributions with systemd the RC_DIR does not exist.
2232
- # Need to create it, the mechanism as such still works and
2233
- # the service is started at boot time .
2232
+ # If RC_PREFIX still exists, e.g. on Rocky-9, we can just create the RC_DIR
2233
+ # and create the links to init.d - the mechanism still works .
2234
2234
# See also issue CS-1227.
2235
- if [ ! -d $RC_PREFIX /$RC_DIR ]; then
2236
- mkdir -p $RC_PREFIX /$RC_DIR
2235
+ # On openSUSE Leap 15.6 the sysv init has been completely removed.
2236
+ # RC_PREFIX does not exist. Even /etc/rc.local does no longer exist.
2237
+ # Nothing we can do there for now, CS 9.1.0 will come with systemd support.
2238
+ # See also issue CS-1231.
2239
+ if [ ! -d $RC_PREFIX ]; then
2240
+ $INFOTEXT " Cannot install SYSV rc scripts, %s does not exist" $RC_PREFIX
2241
+ $INFOTEXT -log " Cannot install SYSV rc scripts, %s does not exist" $RC_PREFIX
2242
+ $INFOTEXT -wait -auto $AUTO -n " Hit <RETURN> to continue >> "
2237
2243
else
2238
- Execute rm -f $RC_PREFIX /$RC_DIR /$S95NAME
2239
- Execute rm -f $RC_PREFIX /$RC_DIR /$K03NAME
2240
- fi
2241
- Execute cp $SGE_STARTUP_FILE $RC_PREFIX /init.d/$STARTUP_FILE_NAME
2242
- Execute chmod a+x $RC_PREFIX /init.d/$STARTUP_FILE_NAME
2243
- Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /$RC_DIR /$S95NAME
2244
- Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /$RC_DIR /$K03NAME
2245
-
2246
- # runlevel management in Linux is different -
2247
- # each runlevel contains full set of links
2248
- # RedHat uses runlevel 5 and SUSE runlevel 3 for xdm
2249
- # RedHat uses runlevel 3 for full networked mode
2250
- # Suse uses runlevel 2 for full networked mode
2251
- # we already installed the script in level 3
2252
- SGE_ARCH=` $SGE_UTIL /arch`
2253
- case $SGE_ARCH in
2254
- lx-* )
2255
- runlevel=` grep " ^id:.:initdefault:" /etc/inittab | cut -f2 -d:`
2256
- if [ " $runlevel " = 2 -o " $runlevel " = 5 ]; then
2257
- $INFOTEXT " Installing startup script also in %s and %s" " $RC_PREFIX /rc${runlevel} .d/$S95NAME " " $RC_PREFIX /rc${runlevel} .d/$K03NAME "
2258
- Execute rm -f $RC_PREFIX /rc${runlevel} .d/$S95NAME
2259
- Execute rm -f $RC_PREFIX /rc${runlevel} .d/$K03NAME
2260
- Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /rc${runlevel} .d/$S95NAME
2261
- Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /rc${runlevel} .d/$K03NAME
2244
+ if [ ! -d $RC_PREFIX /$RC_DIR ]; then
2245
+ mkdir -p $RC_PREFIX /$RC_DIR
2246
+ else
2247
+ Execute rm -f $RC_PREFIX /$RC_DIR /$S95NAME
2248
+ Execute rm -f $RC_PREFIX /$RC_DIR /$K03NAME
2262
2249
fi
2263
- ;;
2264
- esac
2265
-
2250
+ Execute cp $SGE_STARTUP_FILE $RC_PREFIX /init.d/$STARTUP_FILE_NAME
2251
+ Execute chmod a+x $RC_PREFIX /init.d/$STARTUP_FILE_NAME
2252
+ Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /$RC_DIR /$S95NAME
2253
+ Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /$RC_DIR /$K03NAME
2254
+
2255
+ # runlevel management in Linux is different -
2256
+ # each runlevel contains full set of links
2257
+ # RedHat uses runlevel 5 and SUSE runlevel 3 for xdm
2258
+ # RedHat uses runlevel 3 for full networked mode
2259
+ # Suse uses runlevel 2 for full networked mode
2260
+ # we already installed the script in level 3
2261
+ SGE_ARCH=` $SGE_UTIL /arch`
2262
+ case $SGE_ARCH in
2263
+ lx-* )
2264
+ runlevel=` grep " ^id:.:initdefault:" /etc/inittab | cut -f2 -d:`
2265
+ if [ " $runlevel " = 2 -o " $runlevel " = 5 ]; then
2266
+ $INFOTEXT " Installing startup script also in %s and %s" " $RC_PREFIX /rc${runlevel} .d/$S95NAME " " $RC_PREFIX /rc${runlevel} .d/$K03NAME "
2267
+ Execute rm -f $RC_PREFIX /rc${runlevel} .d/$S95NAME
2268
+ Execute rm -f $RC_PREFIX /rc${runlevel} .d/$K03NAME
2269
+ Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /rc${runlevel} .d/$S95NAME
2270
+ Execute ln -s $RC_PREFIX /init.d/$STARTUP_FILE_NAME $RC_PREFIX /rc${runlevel} .d/$K03NAME
2271
+ fi
2272
+ ;;
2273
+ esac
2274
+ fi
2266
2275
elif [ " $RC_FILE " = " insserv-linux" ]; then
2267
2276
echo cp $SGE_STARTUP_FILE $RC_PREFIX /$STARTUP_FILE_NAME
2268
2277
echo /sbin/insserv $RC_PREFIX /$STARTUP_FILE_NAME
0 commit comments