From 4f4681a94923e69b9e078db6f2cae585ecbbb612 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 26 Sep 2011 16:01:45 +0200 Subject: hooks: move shutdown_poweroff before remounting / ro This will make sure the same hook is run regardless of whether you pivot to the shutdown ramfs or not. This is in order to run apcupsd --killpower as pointed out by Gerardo. Signed-off-by: Tom Gundersen --- rc.shutdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc.shutdown b/rc.shutdown index ea86f8f..38b22b0 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -75,6 +75,8 @@ fi [[ $USELVM = [Yy][Ee][Ss] && -x $(type -P lvm) && -d /sys/block ]] && status "Deactivating LVM2 groups" vgchange --sysinit -a n &>/dev/null +run_hook shutdown_poweroff + if [[ -x /run/initramfs/shutdown ]]; then # decide what we want to do @@ -113,8 +115,6 @@ else status "Remounting Root Filesystem Read-only" \ mount -n -o remount,ro / - run_hook shutdown_poweroff - # Power off or reboot printsep if [[ $RUNLEVEL = 0 ]]; then -- cgit v1.2.3