diff options
author | Petr Lautrbach <plautrba@redhat.com> | 2011-03-07 14:59:37 +0100 |
---|---|---|
committer | Petr Lautrbach <plautrba@redhat.com> | 2011-09-20 12:37:11 +0200 |
commit | 385d3acb149694da8f5ff70bba2aed656c190a73 (patch) | |
tree | 9da4b2925f4de472bc0a5cd995567831d499c536 /init | |
parent | 759fc0e032d1709f3cb45a54e5825f74d3b95021 (diff) | |
download | initscripts-385d3acb149694da8f5ff70bba2aed656c190a73.tar initscripts-385d3acb149694da8f5ff70bba2aed656c190a73.tar.gz initscripts-385d3acb149694da8f5ff70bba2aed656c190a73.tar.bz2 initscripts-385d3acb149694da8f5ff70bba2aed656c190a73.tar.xz initscripts-385d3acb149694da8f5ff70bba2aed656c190a73.zip |
add support for emergency target (#681357)
Diffstat (limited to 'init')
-rw-r--r-- | init/rcS-emergency.conf | 14 | ||||
-rw-r--r-- | init/rcS.conf | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/init/rcS-emergency.conf b/init/rcS-emergency.conf new file mode 100644 index 00000000..f37c6231 --- /dev/null +++ b/init/rcS-emergency.conf @@ -0,0 +1,14 @@ +# rcS-emergency - SysVinit emergency compatibility +# +# This task is run before rc.sysinit if emergency is passed to kernel + +console owner + +task + +script + . /etc/sysconfig/init + plymouth --hide-splash || true + [ -z "$EMERGENCY" ] && EMERGENCY=/sbin/sulogin + exec $EMERGENCY +end script diff --git a/init/rcS.conf b/init/rcS.conf index 6f2e7d17..32113a83 100644 --- a/init/rcS.conf +++ b/init/rcS.conf @@ -12,6 +12,16 @@ task # information (we enter rc1 not rcS for maintenance). Run /etc/rc.d/rc # without information so that it defaults to previous=N runlevel=S. console output +pre-start script + for t in $(cat /proc/cmdline); do + case $t in + emergency) + start rcS-emergency + break + ;; + esac + done +end script exec /etc/rc.d/rc.sysinit post-stop script if [ "$UPSTART_EVENTS" = "startup" ]; then |