diff options
author | Tom Gundersen <teg@jklm.no> | 2011-09-26 16:01:45 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2011-09-26 16:01:45 +0200 |
commit | 4f4681a94923e69b9e078db6f2cae585ecbbb612 (patch) | |
tree | 3af1fefee6e9d6db9500f7c32bf0f79c1bcc04e5 /rc.shutdown | |
parent | 6358d9e6b1abd4514f7d342334d3a3e0d8b276a0 (diff) |
hooks: move shutdown_poweroff before remounting / ro2011.09.2
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 <teg@jklm.no>
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-x | rc.shutdown | 4 |
1 files 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 |