summaryrefslogtreecommitdiffstats
path: root/resources/config/1/uniontmp/etc/init/rcS.conf
blob: 2e9efbb0d8b4f8f5fbeb9631e1976be151b5eba8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# rcS - System V single-user mode compatibility
#
# This task handles the old System V-style single-user mode, this is
# distinct from the other runlevels since running the rc script would
# be bad.

description	"System V single-user mode compatibility"
author		"Scott James Remnant <scott@netsplit.com>"

start on runlevel S
stop on runlevel [!S]

console owner
script
    if [ -x /usr/share/recovery-mode/recovery-menu ]; then
	exec /usr/share/recovery-mode/recovery-menu
    else
	exec /sbin/sulogin
    fi
end script

post-stop script
    # Don't switch runlevels if we were stopped by an event, since that
    # means we're already switching runlevels
    if [ -n "${UPSTART_STOP_EVENTS}" ]
    then
	exit 0
    fi

    # Switch, passing a magic flag
    start --no-wait rc-sysinit FROM_SINGLE_USER_MODE=y
end script