Add bootoption to skip an initskript.
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 11 Jun 2010 20:18:20 +0000 (22:18 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 11 Jun 2010 20:18:20 +0000 (22:18 +0200)
config/rootfiles/core/38/filelists/files
src/initscripts/init.d/rc

index ab3698a..ed358da 100644 (file)
@@ -3,6 +3,7 @@ etc/issue
 etc/e2fsck.conf
 etc/httpd/conf/vhosts.d/ipfire-interface.conf
 etc/rc.d/init.d/leds
+etc/rc.d/init.d/rc
 etc/rc.d/init.d/snort
 etc/rc.d/rc0.d/K79leds
 etc/rc.d/rc3.d/S21leds
index 38d4ae2..94e7a08 100644 (file)
@@ -71,8 +71,12 @@ fi
 #Start all functions in this runlevel
 for i in $( ls -v ${rc_base}/rc${runlevel}.d/S* 2> /dev/null)
 do
+       suffix=${i#$rc_base/rc$runlevel.d/S[0-9][0-9]}
+
+       # Skip if initskript is disabled at bootprompt
+       grep "skipinit=$suffix" /proc/cmdline > /dev/null && continue
+
        if [ "${previous}" != "N" ]; then
-               suffix=${i#$rc_base/rc$runlevel.d/S[0-9][0-9]}
                stop=$rc_base/rc$runlevel.d/K[0-9][0-9]$suffix
                prev_start=$rc_base/rc$previous.d/S[0-9][0-9]$suffix