Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish between fs types when mounting sdcards #8

Merged
merged 3 commits into from Feb 6, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion scripts/mount-sd.sh
Expand Up @@ -15,7 +15,17 @@ if [ "$ACTION" = "add" ]; then
exit $?
fi
su $DEVICEUSER -c "mkdir -p $MNT"
mount $SDCARD $MNT -o uid=$DEF_UID,gid=$DEF_GID
case "${ID_FS_TYPE}" in
vfat|ntfs|exfat)
mount $SDCARD $MNT -o uid=$DEF_UID,gid=$DEF_GID
;;
*)
if [ ! -z "${ID_FS_TYPE}" ]; then
mount $SDCARD $MNT
chown $DEF_UID:$DEF_GID $MNT
fi
;;
esac
else
umount $SDCARD

Expand Down