From 773585feb7607e34aaf91318612d695e1b29f8a5 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 18 Aug 2011 15:35:08 +0200 Subject: [PATCH] checkfs: fix return code check after remounting root fs read/only (Davide Madrisan) --- etc/rc.d/init.d/checkfs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/init.d/checkfs b/etc/rc.d/init.d/checkfs index e2d783b..cb7583e 100755 --- a/etc/rc.d/init.d/checkfs +++ b/etc/rc.d/init.d/checkfs @@ -15,10 +15,9 @@ fi echo -n "Mounting root file system in read-only mode: " mount -n -o remount,ro / -evaluate_retval -echo +retval=$? -if [ $? != 0 ]; then +if [ $retval != 0 ]; then $FAILURE echo echo "Cannot check root file system because it could not" @@ -33,6 +32,9 @@ if [ $? != 0 ]; then $rc_base/init.d/halt fi +echo_success +echo + if [ -f /forcefsck ]; then echo "/forcefsck exists, forcing file system check" options="-f"