[arch-projects] [initscripts] [PATCH] fsck_all: Define $fsckret local variable read-only because exposed to hook

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Sat Jun 25 18:33:45 EDT 2011


Credits to: Dave Reisner <d at falconindy.com>
---
 functions |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/functions b/functions
index 253a4d1..ab7928f 100644
--- a/functions
+++ b/functions
@@ -372,7 +372,7 @@ fsck_all() {
 		[[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-- -f"
 		run_hook sysinit_prefsck
 		fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR
-		local fsckret=$?
+		local -r fsckret=$?
 		run_hook sysinit_postfsck
 	# Ignore condition 'FS errors corrected'
 	(( (fsckret | 1) == 1 )) && stat_done || stat_fail
-- 
1.7.1



More information about the arch-projects mailing list