[arch-projects] [PATCH 3/4] Allow custom fsck on shutdown via hook (FS#18736)

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Wed Jun 22 06:07:45 EDT 2011


---
 functions   |    3 +++
 rc.shutdown |    2 ++
 rc.sysinit  |    2 --
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/functions b/functions
index 9b6f695..a02bd3b 100644
--- a/functions
+++ b/functions
@@ -316,6 +316,8 @@ read_crypttab() {
 	return $failed
 }
 
+NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk,noglusterfs,nodavfs"
+
 fsck_all() {
 	stat_busy "Checking Filesystems"
 	FSCK_OUT=/dev/stdout
@@ -401,6 +403,7 @@ fsck_reboot() {
 # 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_postumount: after filesystems are unmounted
 # shutdown_poweroff: directly before powering off in rc.shutdown
 #
 # Declare add_hook and run_hook as read-only to prevent overwriting them.
diff --git a/rc.shutdown b/rc.shutdown
index fc12958..637974f 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -61,6 +61,8 @@ else
 fi
 stat_done
 
+run_hook shutdown_postumount
+
 # Kill non-root encrypted partition mappings
 if [[ -f /etc/crypttab && -n $CS ]] && grep -q ^[^#] /etc/crypttab; then
 	stat_busy "Deactivating encrypted volumes:"
diff --git a/rc.sysinit b/rc.sysinit
index e08adc6..5af74a1 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -211,8 +211,6 @@ if [[ -f /etc/crypttab && -n $CS ]] && grep -q ^[^#] /etc/crypttab; then
 	fi
 fi
 
-NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk,noglusterfs,nodavfs"
-
 if [[ -x $(type -P fsck) ]]; then
 	fsck_all
 	fsck_reboot $?
-- 
1.7.1



More information about the arch-projects mailing list