]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/rescue.service.m4.in
relicense to LGPLv2.1 (with exceptions)
[thirdparty/systemd.git] / units / rescue.service.m4.in
CommitLineData
0667db89
LP
1# This file is part of systemd.
2#
3# systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
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
0667db89
LP
6# (at your option) any later version.
7
8# See systemd.special(7) for details
9
10[Unit]
11Description=Rescue Shell
12DefaultDependencies=no
de47ca9b 13Conflicts=shutdown.target
0fe9972f 14After=basic.target plymouth-start.service
de47ca9b 15Before=shutdown.target
0667db89
LP
16
17[Service]
739848d4 18Environment=HOME=/root
1fd116f7 19WorkingDirectory=/root
be12dd0c 20ExecStartPre=-/bin/plymouth quit
704179d8 21ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl" to view system logs. Type "systemctl reboot" to reboot.'
de47ca9b
LP
22m4_ifdef(`TARGET_FEDORA',
23`EnvironmentFile=/etc/sysconfig/init
9423fd77 24ExecStart=-/bin/bash -c "exec ${SINGLE}"',
1de4d79b
AB
25m4_ifdef(`TARGET_MANDRIVA',
26`EnvironmentFile=/etc/sysconfig/init
27ExecStart=-/bin/bash -c "exec ${SINGLE}"',
6fdae8a6
DM
28m4_ifdef(`TARGET_MAGEIA',
29`EnvironmentFile=/etc/sysconfig/init
30ExecStart=-/bin/bash -c "exec ${SINGLE}"',
54e4fdef
CF
31m4_ifdef(`TARGET_MEEGO',
32`EnvironmentFile=/etc/sysconfig/init
d418f857 33ExecStart=-/bin/bash -c "exec ${SINGLE}"',
6fdae8a6 34`ExecStart=-/sbin/sulogin'))))
9cf25786 35ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
0667db89 36StandardInput=tty-force
cbe82694
MS
37StandardOutput=inherit
38StandardError=inherit
cd25cce9 39KillMode=process
0667db89 40
30609d9c 41# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
0667db89 42# terminates cleanly.
30609d9c 43KillSignal=SIGHUP