summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Biebl <mbiebl@gmail.com>2017-03-23 04:37:06 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-03-22 23:37:06 -0400
commit29f32655842a0712e8db482bcefc4da8908460c8 (patch)
tree3862ac91bd08946c13992c83c71784490eb19027 /src
parent1de2fef652c61621e876446c9f04417b6af18f0b (diff)
units: simplify rescue.service and emergency.service (#5623)
The emergency.service and rescue.service units have become rather convoluted. We spawn multiple shells and the help text spans multiple lines which makes the units hard to read. Move the logic into a single shell script and call that via ExecStart.
Diffstat (limited to 'src')
-rw-r--r--src/sulogin-shell/.gitignore1
-rwxr-xr-xsrc/sulogin-shell/systemd-sulogin-shell.in14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/sulogin-shell/.gitignore b/src/sulogin-shell/.gitignore
new file mode 100644
index 0000000000..01a315524b
--- /dev/null
+++ b/src/sulogin-shell/.gitignore
@@ -0,0 +1 @@
+systemd-sulogin-shell
diff --git a/src/sulogin-shell/systemd-sulogin-shell.in b/src/sulogin-shell/systemd-sulogin-shell.in
new file mode 100755
index 0000000000..d4f32af5f9
--- /dev/null
+++ b/src/sulogin-shell/systemd-sulogin-shell.in
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -x /bin/plymouth ]; then
+ /bin/plymouth --wait quit
+fi
+
+cat <<EOF
+You are in $1 mode. After logging in, type "journalctl -xb" to view
+system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to
+boot into default mode.
+EOF
+
+@SULOGIN@
+@SYSTEMCTL@ --job-mode=fail --no-block default