Viitor_upstart/etc/event.d/rcS-sulogin

26 lines
462 B
Plaintext
Raw Permalink Normal View History

# rcS-sulogin - "single-user" runlevel compatibility
#
# This task runs the sulogin binary during "single-user" mode.
start on runlevel S
stop on runlevel
console owner
script
runlevel --set S >/dev/null || true
/sbin/sulogin
if [ -r /etc/inittab ]; then
RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
if [ -n "$RL" ]; then
telinit $RL
else
telinit 2
fi
else
telinit 2
fi
end script