aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-09 09:59:09 +0000
committerRoy Marples <roy@marples.name>2007-04-09 09:59:09 +0000
commit3a20ea36cc7f1ed89186bdfa46ea0dd2c72742ec (patch)
tree073094b90422c06866c2b2be00fac17fef61e90f
parent049948eb099fcdba631a54ff3b30aa7312e942e1 (diff)
Ensure fbsd sets up $RUNLEVEL correctly when init changes
-rw-r--r--etc.BSD/rc.shutdown6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc.BSD/rc.shutdown b/etc.BSD/rc.shutdown
index 737002d4..0fe22836 100644
--- a/etc.BSD/rc.shutdown
+++ b/etc.BSD/rc.shutdown
@@ -13,5 +13,9 @@ export LD_LIBRARY_PATH
# BSD's init works somewhat differently to sysvinit.
# This block should 'translate' from the way init calls it to the way it would
# be called by sysvinit on linux.
-export RUNLEVEL=S
+case "$1" in
+ reboot) export RUNLEVEL=6;;
+ shutdown) export RUNLEVEL=0;;
+ single) export RUNLEVEL=S;;
+esac
exec /sbin/rc "$1"