init: ignore ret 8 from fsck if not force checking

when /flash or /storage is on non-persistent storage, it's not
yet available at the time fsck -a -p fires, so just skip
and force fsck only if ret=4

now, if /flash or /storage is non-persistent, users get
either non-recovered fs (just as it was before) or debug
shell if the fs is fubar (bad sb and so). nobody cares.
This commit is contained in:
Stefan Saraev 2015-02-22 23:57:36 +02:00
parent 368f9ae5a1
commit c33ddc5c61

View File

@ -442,10 +442,7 @@
FSCK_RET="$?"
# FSCK_RET is the bit-wise OR of the exit codes for each filesystem that is checked.
if [ "$(( $FSCK_RET & 8 ))" = 8 ] ; then
# operational error
force_fsck
elif [ "$(( $FSCK_RET & 4 ))" = 4 ] ; then
if [ "$(( $FSCK_RET & 4 ))" = 4 ] ; then
# errors left
force_fsck
elif [ "$(( $FSCK_RET & 2 ))" = 2 ] ; then