package file-rc
tags 505552 + patch
thanks

Here's a patch to fix this, created by copying the corresponding code
from sysv-rc

--Ken

-- 
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/
diff -ur file-rc-0.8.11.orig/invoke-rc.d file-rc-0.8.11/invoke-rc.d
--- file-rc-0.8.11.orig/invoke-rc.d	2008-05-01 05:16:33.000000000 -0500
+++ file-rc-0.8.11/invoke-rc.d	2008-12-01 09:42:16.000000000 -0600
@@ -292,6 +292,15 @@
     RL=
 fi
 
+## Running ${RUNLEVEL} to get current runlevel do not work in the boot
+## runlevel (scripts in /etc/rcS.d/), as /var/run/utmp contain
+## runlevel 0 or 6 (written at shutdown) at that point.
+if test x${RL} = x0 || test x${RL} = x6 ; then
+    if ps -fp 1 | grep -q 'init boot' ; then
+       RL=S
+    fi
+fi
+
 ## Handles shutdown sequences VERY safely
 ## i.e.: forget about policy, and do all we can to run the script.
 ## BTW, why the heck are we being run in a shutdown runlevel?!

Attachment: signature.asc
Description: Digital signature

Reply via email to