From 89668811cb79fd14d0140e2d6cff6daf1c1f6e5a Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 30 Aug 2010 21:47:10 +0200 Subject: [PATCH] Add umount.target to shutdown scripts Makes sure we umount the file system before shutting down. --- units/debian/halt.service | 5 +++-- units/debian/killall.service | 3 +++ units/debian/poweroff.service | 5 +++-- units/debian/reboot.service | 5 +++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/units/debian/halt.service b/units/debian/halt.service index c539ec26..6be46b56 100644 --- a/units/debian/halt.service +++ b/units/debian/halt.service @@ -18,8 +18,8 @@ [Unit] Description=Halt DefaultDependencies=no -Requires=shutdown.target killall.service -After=shutdown.target killall.service +Requires=shutdown.target umount.target killall.service +After=shutdown.target umount.target killall.service [Service] Type=oneshot @@ -27,3 +27,4 @@ RemainAfterExit=yes Environment=INIT_HALT=HALT Environment=RUNLEVEL=0 ExecStart=/etc/init.d/halt stop +StandardOutput=tty diff --git a/units/debian/killall.service b/units/debian/killall.service index 76cd2403..b1819f6c 100644 --- a/units/debian/killall.service +++ b/units/debian/killall.service @@ -18,8 +18,11 @@ [Unit] Description=Kill All Processes DefaultDependencies=no +After=shutdown.target +RefuseManualStart=yes [Service] Type=oneshot RemainAfterExit=yes ExecStart=/etc/init.d/sendsigs stop +StandardOutput=tty diff --git a/units/debian/poweroff.service b/units/debian/poweroff.service index bff7dc38..2522e8ed 100644 --- a/units/debian/poweroff.service +++ b/units/debian/poweroff.service @@ -18,11 +18,12 @@ [Unit] Description=Power-Off DefaultDependencies=no -Requires=shutdown.target killall.service -After=shutdown.target killall.service +Requires=shutdown.target umount.target killall.service +After=shutdown.target umount.target killall.service [Service] Type=oneshot RemainAfterExit=yes Environment=RUNLEVEL=0 ExecStart=/etc/init.d/halt stop +StandardOutput=tty diff --git a/units/debian/reboot.service b/units/debian/reboot.service index 5f9fe989..fedce04d 100644 --- a/units/debian/reboot.service +++ b/units/debian/reboot.service @@ -18,11 +18,12 @@ [Unit] Description=Reboot DefaultDependencies=no -Requires=shutdown.target killall.service -After=shutdown.target killall.service +Requires=shutdown.target umount.target killall.service +After=shutdown.target umount.target killall.service [Service] Type=oneshot RemainAfterExit=yes Environment=RUNLEVEL=6 ExecStart=/etc/init.d/reboot stop +StandardOutput=tty -- 2.39.5