From: Michael Mrozek Date: Sun, 20 Jun 2010 23:37:17 +0000 (+0200) Subject: udev-151: mount.sh: Now using dirsync and label names (if possible) X-Git-Tag: sz_beta3~134 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b5f5b205ba153ae690aefa0bba59b0630c48c5e;p=openembedded.git udev-151: mount.sh: Now using dirsync and label names (if possible) --- diff --git a/recipes/udev/udev-151/omap3-pandora/mount.sh b/recipes/udev/udev-151/omap3-pandora/mount.sh old mode 100644 new mode 100755 index 7ba2b3fc2a..3a37da2896 --- a/recipes/udev/udev-151/omap3-pandora/mount.sh +++ b/recipes/udev/udev-151/omap3-pandora/mount.sh @@ -8,7 +8,10 @@ MOUNT="/bin/mount" PMOUNT="/usr/bin/pmount" UMOUNT="/bin/umount" +blkid="/usr/sbin/blkid" name="`basename "$DEVNAME"`" +name2="`$blkid "$DEVNAME" -o value -s LABEL`" + for line in `cat /etc/udev/mount.blacklist | grep -v ^#` do @@ -20,10 +23,18 @@ do done automount() { + if [ ! $name2 = "" ] + then + c=1 + while ( cat /proc/mounts | grep "/media/$name2" ); do + name2="$name2-$c" + c=$(expr $c + 1) + done + name="$name2" + fi ! test -d "/media/$name" && mkdir -p "/media/$name" - if ! $MOUNT -t auto -o sync,noatime,umask=0 $DEVNAME "/media/$name" && \ - ! $MOUNT -t auto -o sync,noatime $DEVNAME "/media/$name" + if ! $MOUNT -t auto -o dirsync,noatime,umask=0 $DEVNAME "/media/$name" && ! $MOUNT -t auto -o dirsync,noatime $DEVNAME "/media/$name" then #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!" rm_dir "/media/$name" @@ -70,5 +81,5 @@ if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then done # Remove empty directories from auto-mounter - test -e "/tmp/.automount-$name" && rm_dir "/media/$name" + test -e "/tmp/.automount-$name" && rm_dir "$mnt" fi diff --git a/recipes/udev/udev_151.bb b/recipes/udev/udev_151.bb index bcff3de1d1..0534b99ec5 100644 --- a/recipes/udev/udev_151.bb +++ b/recipes/udev/udev_151.bb @@ -3,7 +3,7 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod the hotplug package and requires a kernel not older than 2.6.12." LICENSE = "GPLv2+" -PR = "r11" +PR = "r12" # Untested DEFAULT_PREFERENCE = "-1"