summaryrefslogtreecommitdiff
path: root/dracut-kdump-emergency.service
diff options
context:
space:
mode:
Diffstat (limited to 'dracut-kdump-emergency.service')
-rw-r--r--dracut-kdump-emergency.service28
1 files changed, 28 insertions, 0 deletions
diff --git a/dracut-kdump-emergency.service b/dracut-kdump-emergency.service
new file mode 100644
index 0000000..e023284
--- /dev/null
+++ b/dracut-kdump-emergency.service
@@ -0,0 +1,28 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# This service will be placed in kdump initramfs and replace both the systemd
+# emergency service and dracut emergency shell. IOW, any emergency will be
+# kick this service and in turn isolating to kdump error handler.
+
+[Unit]
+Description=Kdump Emergency
+DefaultDependencies=no
+IgnoreOnIsolate=yes
+
+[Service]
+ExecStart=/usr/bin/systemctl --no-block isolate kdump-error-handler.service
+Type=oneshot
+StandardInput=tty-force
+StandardOutput=inherit
+StandardError=inherit
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
+# terminates cleanly.
+KillSignal=SIGHUP