summaryrefslogtreecommitdiff
path: root/units/emergency.service.in
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2014-07-08 17:42:23 +0200
committerMichal Sekletar <msekleta@redhat.com>2014-07-09 18:21:04 +0200
commitd3381512282f2ca1c7669f77fb736a90fdce6982 (patch)
tree1effb5ef0edf89925d72867d858744a2b4ae9cbc /units/emergency.service.in
parentb72ddf0f4f552dd53d6404b6ddbc9f17d02b8e12 (diff)
units: make ExecStopPost action part of ExecStart
Currently after exiting rescue shell we isolate default target. User might want to isolate to some other target than default one. However issuing systemctl isolate command to desired target would bring system to default target as a consequence of running ExecStopPost action. Having common ancestor for rescue shell and possible followup systemctl default command should fix this. If user exits rescue shell we will proceed with isolating default target, otherwise, on manual isolate, parent shell process is terminated and we don't isolate default target, but target chosen by user. Suggested-by: Michal Schmidt <mschmidt@redhat.com>
Diffstat (limited to 'units/emergency.service.in')
-rw-r--r--units/emergency.service.in3
1 files changed, 1 insertions, 2 deletions
diff --git a/units/emergency.service.in b/units/emergency.service.in
index 94c090f654..91fc1bbf51 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
@@ -17,8 +17,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