chiark / gitweb /
README: mention dependency on libpython
[elogind.git] / units / rescue.service.m4.in
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 Lesser General Public License as published by
5 #  the Free Software Foundation; either version 2.1 of the License, or
6 #  (at your option) any later version.
7
8 [Unit]
9 Description=Rescue Shell
10 Documentation=man:sulogin(8)
11 DefaultDependencies=no
12 Conflicts=shutdown.target
13 After=sysinit.target plymouth-start.service
14 Before=shutdown.target
15
16 [Service]
17 Environment=HOME=/root
18 WorkingDirectory=/root
19 ExecStartPre=-/bin/plymouth quit
20 ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
21 m4_ifdef(`TARGET_FEDORA',
22 `EnvironmentFile=/etc/sysconfig/init
23 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
24 m4_ifdef(`TARGET_MANDRIVA',
25 `EnvironmentFile=/etc/sysconfig/init
26 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
27 m4_ifdef(`TARGET_MAGEIA',
28 `EnvironmentFile=/etc/sysconfig/init
29 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
30 `ExecStart=-/sbin/sulogin')))
31 ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
32 Type=idle
33 StandardInput=tty-force
34 StandardOutput=inherit
35 StandardError=inherit
36 KillMode=process
37
38 # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
39 # terminates cleanly.
40 KillSignal=SIGHUP