chiark / gitweb /
Fedora: Assorted tweaks to Fedora single-user mode.
[elogind.git] / units / fedora / single.service
index be30efcaa9ca480b519eba1660827e663ad85582..f36cbf3145deb81325de905547bf74e429830a5a 100644 (file)
 [Unit]
 Description=Rescue Shell
 DefaultDependencies=no
-Conflicts=multi-user.target
-After=sysinit.target multi-user.target
+Conflicts=multi-user.target shutdown.target
+After=basic.target
+Before=multi-user.target
 
 [Service]
+Environment=HOME=/root
+Environment=TERM=vt100-nav
+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