Add bootoption to skip an initskript.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / rc
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
 #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
        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
 
                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