Skip to content

Commit

Permalink
fixed ext3 filesystems not mounted by udev
Browse files Browse the repository at this point in the history
  • Loading branch information
WanWizard committed Dec 23, 2020
1 parent ddd8c00 commit 5a08a91
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions meta-openpli/recipes-core/udev/files/mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,18 +194,24 @@ automount() {
MOUNT="$MOUNT -o silent"
fi

# If filesystem type is vfat, change the ownership group to 'disk', and
# grant it with w/r/x permissions.
# Deal with specific file system exceptions
case $ID_FS_TYPE in
ext3)
# ext3 devices need to be mounted with the ext4 driver
MOUNT="$MOUNT -t ext4"
;;
vfat|fat)
MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
# If filesystem type is vfat, change the ownership group to 'disk', and
# grant it with w/r/x permissions.
MOUNT="$MOUNT -t auto -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
;;
# TODO
*)
# Let mount figure it out
MOUNT="$MOUNT -t auto"
;;
esac

if ! $MOUNT -t auto $DEVNAME "/media/$LABEL"
if ! $MOUNT $DEVNAME "/media/$LABEL"
then
logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$LABEL\" failed!"
rm_dir "/media/$LABEL"
Expand Down

0 comments on commit 5a08a91

Please sign in to comment.