rc-scripts/trunk/rc.d/rc
baggins
cvs at pld-linux.org
Wed Oct 19 13:01:42 CEST 2005
Author: baggins
Date: Wed Oct 19 13:01:37 2005
New Revision: 6462
Modified:
rc-scripts/trunk/rc.d/rc
Log:
- check for proper first argument in correct place
Modified: rc-scripts/trunk/rc.d/rc
==============================================================================
--- rc-scripts/trunk/rc.d/rc (original)
+++ rc-scripts/trunk/rc.d/rc Wed Oct 19 13:01:37 2005
@@ -66,9 +66,15 @@
export runlevel previous
fi
+# Get first argument. Set new runlevel to this argument.
+[ -n "$argv1" ] && runlevel="$argv1"
+
# if previous runlevel = current runlevel do nothing
[ "$runlevel" = "$previous" ] && exit 0
+# Tell linuxconf what runlevel we are in
+[ -d /var/run -a -w /var/run ] && echo "/etc/rc.d/rc$runlevel.d" > /var/run/runlevel.dir
+
# if runlevel is 0 (halt) or 6 (reboot) change to first
# virtual console, and send messages to /dev/console
# (it can be serial console too)
@@ -133,17 +139,9 @@
export progress=0
fi
-
# set onlcr to avoid staircase effect and do not lock scrolling
stty onlcr -ixon 0>&1
-# Get first argument. Set new runlevel to this argument.
-[ -n "$1" ] && runlevel="$argv1"
-
-# Tell linuxconf what runlevel we are in
-[ -d /var/run -a -w /var/run ] && echo "/etc/rc.d/rc$runlevel.d" > /var/run/runlevel.dir
-
-
# Say something ;)
af2=$(termput setaf $CRESMAN)
af6=$(termput setaf $CBRACKETS)
More information about the pld-cvs-commit
mailing list