rc: always force an fsck after unclean shutdown

This commit is contained in:
Franco Fichtner 2016-06-22 15:59:37 +02:00
parent 0e38a48778
commit 80dc8457bc

View File

@ -45,13 +45,15 @@ while read FS_PART FS_MNT FS_TYPE FS_MORE; do
fi
done < /etc/fstab
fsck -C -y /
attempts=0
while [ ${attempts} -lt 3 ]; do
fsck -C -y /
if mount -a 2>/dev/null; then
# bail if all is well
break
fi
fsck -y /
attempts=$((attempts+1))
done