X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=units%2Femergency.service;h=8745d101c7f78827fc5cbabbb1552d5a55937426;hp=924723fefede74b2fe1a98653aa5cf781b4477d7;hb=319346674c5665af895e854e1754eed4b5e36f42;hpb=1f48cf56cb2693b84fdc76dc8df0b048ed50ef43 diff --git a/units/emergency.service b/units/emergency.service index 924723fef..8745d101c 100644 --- a/units/emergency.service +++ b/units/emergency.service @@ -9,6 +9,7 @@ [Unit] Description=Emergency Shell +DefaultDependencies=no [Service] ExecStart=/bin/sh @@ -16,3 +17,7 @@ StandardInput=tty Restart=restart-always RestartSec=0 KillMode=process-group + +# Bash ignores SIGTERM, so we send SIGHUP first, to ensure that bash +# terminates cleanly. +ExecStop=/bin/kill -HUP $(MAINPID)