Revision 1108,
743 bytes
checked in by daisuke, 14 years ago
(diff) |
import initscripts-8.90.6 from internal cvs repository
|
Line | |
---|
1 | # rcS - runlevel compatibility |
---|
2 | # |
---|
3 | # This task runs the old sysv-rc startup scripts. |
---|
4 | |
---|
5 | start on startup |
---|
6 | |
---|
7 | stop on runlevel |
---|
8 | |
---|
9 | task |
---|
10 | |
---|
11 | # Note: there can be no previous runlevel here, if we have one it's bad |
---|
12 | # information (we enter rc1 not rcS for maintenance). Run /etc/rc.d/rc |
---|
13 | # without information so that it defaults to previous=N runlevel=S. |
---|
14 | console output |
---|
15 | exec /etc/rc.d/rc.sysinit |
---|
16 | post-stop script |
---|
17 | if [ "$UPSTART_EVENTS" = "startup" ]; then |
---|
18 | runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab) |
---|
19 | [ -z "$runlevel" ] && runlevel="3" |
---|
20 | for t in $(cat /proc/cmdline); do |
---|
21 | case $t in |
---|
22 | -s|single|S|s) runlevel="S" ;; |
---|
23 | [1-9]) runlevel="$t" ;; |
---|
24 | esac |
---|
25 | done |
---|
26 | exec telinit $runlevel |
---|
27 | fi |
---|
28 | end script |
---|
Note: See
TracBrowser
for help on using the repository browser.