dracut-systemd/dracut-initqueue: only start service if really needed
[dracut.git] / modules.d / 98dracut-systemd / emergency.service
blob5f1eaa23b82f36bbc144730451b0c1c00f7562b4
1 #  This file is part of systemd.
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.
8 # See systemd.special(7) for details
10 [Unit]
11 Description=Emergency Shell
12 DefaultDependencies=no
13 After=systemd-vconsole-setup.service
14 Wants=systemd-vconsole-setup.service
15 ConditionPathExists=!/lib/dracut/no-emergency-shell
17 [Service]
18 Environment=HOME=/
19 Environment=DRACUT_SYSTEMD=1
20 Environment=NEWROOT=/sysroot
21 WorkingDirectory=/
22 ExecStart=/bin/dracut-emergency
23 ExecStopPost=-/usr/bin/systemctl --fail --no-block default
24 Type=oneshot
25 StandardInput=tty-force
26 StandardOutput=inherit
27 StandardError=inherit
28 KillMode=process
29 IgnoreSIGPIPE=no
31 # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
32 # terminates cleanly.
33 KillSignal=SIGHUP