summaryrefslogtreecommitdiffstats
path: root/units
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-23 04:37:06 +0100
commit29f32655842a0712e8db482bcefc4da8908460c8 (patch)
tree3862ac91bd08946c13992c83c71784490eb19027 /units
parentbuild-sys: minor indentation fix (diff)
downloadsystemd-29f32655842a0712e8db482bcefc4da8908460c8.tar.xz
systemd-29f32655842a0712e8db482bcefc4da8908460c8.zip
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 'units')
-rw-r--r--units/emergency.service.in4
-rw-r--r--units/rescue.service.in4
2 files changed, 2 insertions, 6 deletions
diff --git a/units/emergency.service.in b/units/emergency.service.in
index 9f60931a9f..e9eb238b98 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
@@ -17,9 +17,7 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
WorkingDirectory=-/root
-ExecStartPre=-/bin/sh -c "[ -x /bin/plymouth ] && /bin/plymouth --wait quit"
-ExecStartPre=-/bin/echo -e 'You are in emergency mode. After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
-ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
+ExecStart=-@rootlibexecdir@/systemd-sulogin-shell emergency
Type=idle
StandardInput=tty-force
StandardOutput=inherit
diff --git a/units/rescue.service.in b/units/rescue.service.in
index dc6d14b25a..4ab66f4856 100644
--- a/units/rescue.service.in
+++ b/units/rescue.service.in
@@ -16,9 +16,7 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
WorkingDirectory=-/root
-ExecStartPre=-/bin/sh -c "[ -x /bin/plymouth ] && /bin/plymouth --wait quit"
-ExecStartPre=-/bin/echo -e 'You are in rescue mode. After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
-ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
+ExecStart=-@rootlibexecdir@/systemd-sulogin-shell rescue
Type=idle
StandardInput=tty-force
StandardOutput=inherit