7b7f6e837b
git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_upstart@4329 504e572c-2e33-0410-9681-be2bf7408885
29 lines
588 B
Plaintext
29 lines
588 B
Plaintext
# rc - runlevel compatibility
|
|
#
|
|
# This task guesses what the "default runlevel" should be and starts the
|
|
# appropriate script.
|
|
|
|
start on started syslogd
|
|
|
|
stop on runlevel
|
|
|
|
console logged
|
|
|
|
script
|
|
echo "Starting rc-default script"
|
|
/sbin/runlevel --reboot || true
|
|
|
|
if grep -q -w -- "-s\|single\|S" /proc/cmdline; then
|
|
/sbin/telinit S
|
|
elif [ -r /etc/inittab ]; then
|
|
RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
|
|
if [ -n "$RL" ]; then
|
|
/sbin/telinit $RL
|
|
else
|
|
/sbin/telinit 2
|
|
fi
|
|
else
|
|
/sbin/telinit 2
|
|
fi
|
|
end script
|