aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/rcS-emergency.conf14
-rw-r--r--init/rcS.conf10
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