Skip to content

Commit

Permalink
fschk before mounting.
Browse files Browse the repository at this point in the history
To detect and fix corruption.
  • Loading branch information
V10lator committed Jul 8, 2015
1 parent a945e28 commit 8dc0803
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/mount-sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ if [ "$ACTION" = "add" ]; then
exit 0
fi

case "${TYPE}" in
f2fs)
FSCK_OPTS="-a"
;;
*)
FSCK_OPTS="-p"
;;
esac
fsck $FSCK_OPTS ${DEVNAME}

test -d $MNT/${UUID} || mkdir -p $MNT/${UUID}
chown $DEF_UID:$DEF_GID $MNT $MNT/${UUID}

Expand Down

0 comments on commit 8dc0803

Please sign in to comment.