From 5a08a91e17b7a04b0203ec1ff6a6396846403952 Mon Sep 17 00:00:00 2001 From: Harro Verton Date: Wed, 23 Dec 2020 17:45:21 +0000 Subject: [PATCH] fixed ext3 filesystems not mounted by udev --- meta-openpli/recipes-core/udev/files/mount.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/meta-openpli/recipes-core/udev/files/mount.sh b/meta-openpli/recipes-core/udev/files/mount.sh index 1b750708..e31b9986 100644 --- a/meta-openpli/recipes-core/udev/files/mount.sh +++ b/meta-openpli/recipes-core/udev/files/mount.sh @@ -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"