]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- check for proper first argument in correct place
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 19 Oct 2005 11:01:37 +0000 (11:01 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 19 Oct 2005 11:01:37 +0000 (11:01 +0000)
svn-id: @6462

rc.d/rc

diff --git a/rc.d/rc b/rc.d/rc
index b41a36bc45b8e5c563a6be4eca1ea8630620d18c..f835047b6d00676f4393b2eb4a1e0be9c00442fc 100755 (executable)
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -66,9 +66,15 @@ if [ "$argv2" != "chroot" ]; then
     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 @@ else
        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)
This page took 0.046231 seconds and 4 git commands to generate.