From f93c5d94073fbc0396696863da05fc18ad36e718 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Mon, 29 Aug 2011 18:14:40 -0400 Subject: [PATCH] add shutdown_preumount hook --- functions | 1 + rc.shutdown | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/functions b/functions index f68c088..e9c7711 100644 --- a/functions +++ b/functions @@ -469,6 +469,7 @@ bootlogd_stop() { # single_prekillall: before all processes are being killed in rc.single # shutdown_postkillall: after all processes have been killed in rc.shutdown # single_postkillall: after all processes have been killed in rc.single +# shutdown_preumount: after last filesystem write, but before filesystems are unmounted # shutdown_postumount: after filesystems are unmounted # shutdown_poweroff: directly before powering off in rc.shutdown # diff --git a/rc.shutdown b/rc.shutdown index db8f50b..909fe06 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -51,6 +51,8 @@ status "Deactivating Swap" swapoff -a status "Deactivating monitoring of LVM2 groups" \ vgchange --monitor n &>/dev/null +run_hook shutdown_preumount + # if we don't have devtmpfs support, /dev is mounted as tmpfs, so don't unmount it status "Unmounting Filesystems" \ umount -a -r -t nodevtmpfs,notmpfs,nosysfs,noproc,nodevpts -O no_netdev -- 1.7.6.1