Commit 773585feb7607e34aaf91318612d695e1b29f8a5

Authored by Silvan Calarco
1 parent 5698192bd7
Exists in master

checkfs: fix return code check after remounting root fs read/only (Davide Madrisan)

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

etc/rc.d/init.d/checkfs
... ... @@ -15,10 +15,9 @@
15 15  
16 16 echo -n "Mounting root file system in read-only mode: "
17 17 mount -n -o remount,ro /
18   -evaluate_retval
19   -echo
  18 +retval=$?
20 19  
21   -if [ $? != 0 ]; then
  20 +if [ $retval != 0 ]; then
22 21 $FAILURE
23 22 echo
24 23 echo "Cannot check root file system because it could not"
... ... @@ -32,6 +31,9 @@
32 31 echo "gonna run: $rc_base/init.d/halt"
33 32 $rc_base/init.d/halt
34 33 fi
  34 +
  35 +echo_success
  36 +echo
35 37  
36 38 if [ -f /forcefsck ]; then
37 39 echo "/forcefsck exists, forcing file system check"