units: don't fail if /root doesn't exist for shell units
authorLennart Poettering <lennart@poettering.net>
Sun, 17 Jan 2016 16:25:42 +0000 (17:25 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 17 Jan 2016 19:47:46 +0000 (20:47 +0100)
As discussed on the ML:

http://lists.freedesktop.org/archives/systemd-devel/2016-January/035594.html

units/console-shell.service.m4.in
units/emergency.service.in
units/rescue.service.in

index 5c80722..a345ec2 100644 (file)
@@ -16,7 +16,7 @@ Before=getty.target
 
 [Service]
 Environment=HOME=/root
-WorkingDirectory=/root
+WorkingDirectory=-/root
 ExecStart=-@SULOGIN@
 ExecStopPost=-@SYSTEMCTL@ poweroff
 Type=idle
index 8dc3cbd..fb390ea 100644 (file)
@@ -15,7 +15,7 @@ Before=shutdown.target
 
 [Service]
 Environment=HOME=/root
-WorkingDirectory=/root
+WorkingDirectory=-/root
 ExecStartPre=-/bin/plymouth --wait 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" or ^D to\\ntry again to boot into default mode.'
 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
index 432e4f3..6c20217 100644 (file)
@@ -15,7 +15,7 @@ Before=shutdown.target
 
 [Service]
 Environment=HOME=/root
-WorkingDirectory=/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" or ^D to\\nboot into default mode.'
 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"