chiark / gitweb /
units: make emergency.service conflict with rescue.service
[elogind.git] / units / emergency.service.in
index 94c090f654be34b42cf8014ce255dbad86ae0ca1..224a434f721f2bc680b86db3dd3c541b956c662f 100644 (file)
@@ -10,6 +10,7 @@ Description=Emergency Shell
 Documentation=man:sulogin(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
+Conflicts=rescue.service
 Before=shutdown.target
 
 [Service]
@@ -17,8 +18,7 @@ Environment=HOME=/root
 WorkingDirectory=/root
 ExecStartPre=-/bin/plymouth quit
 ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
-ExecStart=-/sbin/sulogin
-ExecStopPost=@SYSTEMCTL@ --fail --no-block default
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
 Type=idle
 StandardInput=tty-force
 StandardOutput=inherit