chiark / gitweb /
units: Remove the distro specific references to killall.service.
[elogind.git] / units / fedora / single.service
index 93a70cf4b0fe020a2fe7b078a865fb0a99e97385..550df1ef6099dd88e2a1b0afce5d0a66b309ec41 100644 (file)
@@ -15,14 +15,16 @@ After=sysinit.target
 Before=multi-user.target
 
 [Service]
+Environment=HOME=/root
+EnvironmentFile=/etc/sysconfig/init
+WorkingDirectory=/root
 ExecStartPre=-/bin/plymouth --hide-splash
-ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" to activate default mode.'
-ExecStart=/bin/sh
+ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" or ^D to activate default mode.'
+ExecStart=-/bin/bash -c "exec $SINGLE"
+ExecStopPost=/bin/systemctl default
 StandardInput=tty-force
-Restart=restart-always
-RestartSec=0
 KillMode=process-group
 
-# Bash ignores SIGTERM, so we send SIGHUP first, to ensure that bash
+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
 # terminates cleanly.
-ExecStop=-/bin/kill -HUP ${MAINPID}
+KillSignal=SIGHUP