chiark / gitweb /
cgls: by default start with group of PID 1
[elogind.git] / units / rescue.service.m4
1 #  This file is part of systemd.
2 #
3 #  systemd is free software; you can redistribute it and/or modify it
4 #  under the terms of the GNU General Public License as published by
5 #  the Free Software Foundation; either version 2 of the License, or
6 #  (at your option) any later version.
7
8 # See systemd.special(7) for details
9
10 [Unit]
11 Description=Rescue Shell
12 DefaultDependencies=no
13 Conflicts=shutdown.target
14 After=basic.target
15 Before=shutdown.target
16 m4_ifdef(`TARGET_MANDRIVA',
17 `# Hide SysV script
18 Names=single.service')
19
20 [Service]
21 Environment=HOME=/root
22 WorkingDirectory=/root
23 ExecStartPre=-/bin/plymouth quit
24 ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" or ^D to activate default mode.'
25 m4_ifdef(`TARGET_FEDORA',
26 `EnvironmentFile=/etc/sysconfig/init
27 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
28 m4_ifdef(`TARGET_MANDRIVA',
29 `EnvironmentFile=/etc/sysconfig/init
30 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
31 `ExecStart=-/sbin/sulogin'))
32 ExecStopPost=-/bin/systemctl --fail default
33 StandardInput=tty-force
34 KillMode=process-group
35
36 # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
37 # terminates cleanly.
38 KillSignal=SIGHUP