Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 - 1
# rcS - runlevel compatibility
2
#
3
# This task runs the old sysv-rc startup scripts.
4
#
5
# Do not edit this file directly. If you want to change the behaviour,
6
# please create a file rcS.override and put your changes there.
7
 
8
start on startup
9
 
10
stop on runlevel
11
 
12
task
13
 
14
# Note: there can be no previous runlevel here, if we have one it's bad
15
# information (we enter rc1 not rcS for maintenance).  Run /etc/rc.d/rc
16
# without information so that it defaults to previous=N runlevel=S.
17
console output
18
pre-start script
19
	for t in $(cat /proc/cmdline); do
20
		case $t in
21
			emergency)
22
				start rcS-emergency
23
				break
24
			;;
25
		esac
26
	done
27
end script
28
exec /etc/rc.d/rc.sysinit
29
post-stop script
30
	if [ "$UPSTART_EVENTS" = "startup" ]; then
31
		[ -f /etc/inittab ] && runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
32
		[ -z "$runlevel" ] && runlevel="3"
33
		for t in $(cat /proc/cmdline); do
34
			case $t in
35
				-s|single|S|s) runlevel="S" ;;
36
				[1-9])       runlevel="$t" ;;
37
			esac
38
		done
39
		exec telinit $runlevel
40
	fi
41
end script