]> git.pld-linux.org Git - projects/rc-scripts.git/blob - init/rcS.conf
d3bbbc1ae03a3f1a0b2fb84233afa8484b1b7347
[projects/rc-scripts.git] / init / rcS.conf
1 description "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 emits all-swaps filesystem local-filesystems root-filesystem virtual-filesystems runlevel
10
11 task
12
13 # Note: there can be no previous runlevel here, if we have one it's bad
14 # information (we enter rc1 not rcS for maintenance).  Run /etc/rc.d/rc
15 # without information so that it defaults to previous=N runlevel=S.
16 console output
17 exec /etc/rc.d/rc.sysinit
18 post-stop script
19         if [ "$UPSTART_EVENTS" = "startup" ]; then
20                 runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
21                 [ -z "$runlevel" ] && runlevel="3"
22                 for t in $(cat /proc/cmdline); do
23                         case $t in
24                                 -s|single|S|s) runlevel="S" ;;
25                                 [1-9])       runlevel="$t" ;;
26                         esac
27                 done
28                 exec telinit $runlevel
29         fi
30 end script
31
32 # vi: ft=upstart
This page took 0.046856 seconds and 2 git commands to generate.