From f43b8075100538e1d07d3342284393c54ef3c845 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Tue, 29 Jun 2010 03:59:10 +0200 Subject: [PATCH] udev_151: Fixed mount.sh to not use cache with blkid --- recipes/udev/udev-151/omap3-pandora/mount.sh | 9 ++++----- recipes/udev/udev_151.bb | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/udev/udev-151/omap3-pandora/mount.sh b/recipes/udev/udev-151/omap3-pandora/mount.sh index 5f20c8577c..979fb277e0 100755 --- a/recipes/udev/udev-151/omap3-pandora/mount.sh +++ b/recipes/udev/udev-151/omap3-pandora/mount.sh @@ -10,10 +10,10 @@ PMOUNT="/usr/bin/pmount" UMOUNT="/bin/umount" blkid="/usr/sbin/blkid" name="`basename "$DEVNAME"`" -name2="`$blkid "$DEVNAME" -o value -s LABEL`" +name2="`$blkid "$DEVNAME" -c /dev/null -o value -s LABEL`" name3=$(echo $DEVNAME | sed 's/.*dev.//g') -for line in `cat /etc/udev/mount.blacklist | grep -v ^#` +for line in `grep -v ^# /etc/udev/mount.blacklist` do if ( echo "$DEVNAME" | grep -q "$line" ) then @@ -26,7 +26,7 @@ automount() { if [ -n "$name2" ] then c=1 - while ( cat /proc/mounts | grep "/media/$name2" ); do + while ( grep "/media/$name2" /proc/mounts); do name2="$name2-$c" c=$(expr $c + 1) done @@ -41,7 +41,6 @@ automount() { else logger "mount.sh/automount" "Auto-mount of [/media/$name] successful" touch "/tmp/.automount-$name3" - echo $name3 > /tmp/test fi } @@ -73,7 +72,7 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then fi if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then - for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` + for mnt in `grep "$DEVNAME" /proc/mounts | cut -f 2 -d " " ` do # 20100306: Remove the mount point forcibly (Lazy) as the user has already removed the device by the # DJWillis: time this fires so any handles are bad anyway. This should stop 'stale' folders being diff --git a/recipes/udev/udev_151.bb b/recipes/udev/udev_151.bb index ac6afe302d..8081855d34 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 = "r13" +PR = "r14" # Untested DEFAULT_PREFERENCE = "-1" -- 2.39.5