X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/faf7173b4df3a152dbdc574751078b359c116d5b..6580b7a68d7a87b374cf1b29d376793fcfb0708b:/package/block-mount/files/fsck.sh diff --git a/package/block-mount/files/fsck.sh b/package/block-mount/files/fsck.sh index d80e71693..3011160a4 100644 --- a/package/block-mount/files/fsck.sh +++ b/package/block-mount/files/fsck.sh @@ -12,25 +12,23 @@ libmount_fsck() { local found_fsck=0 - [ -n "$fsck_type" ] && [ "$fsck_type" != "swap" ] && { - grep -q "$device" /proc/swaps || grep -q "$device" /proc/mounts || { - [ -e "$device" ] && [ "$fsck_enabled" -eq 1 ] && { - for known_type in $libmount_known_fsck; do - if [ "$known_type" = "$fsck_fstype" ]; then - fsck_${known_type} "$device" - found_fsck=1 - break - fi - done - if [ "$found_fsck" -ne 1 ]; then - logger -t 'fstab' "Unable to check/repair $device; no known fsck for filesystem type $fstype" + grep -q "$device" /proc/swaps || grep -q "$device" /proc/mounts || { + [ -e "$device" ] && [ "$fsck_enabled" -eq 1 ] && { + for known_type in $libmount_known_fsck; do + if [ "$known_type" = "$fsck_fstype" ]; then + fsck_${known_type} "$device" + found_fsck=1 + break fi - } + done + if [ "$found_fsck" -ne 1 ]; then + logger -t 'fstab' "Unable to check/repair $device; no known fsck for filesystem type $fstype" + fi } } } libmount_known_fsck="" -include /lib/functions/fsck +pi_include /lib/functions/fsck