From c7ec34633960c5412ad28e1166f3c3955c9206cb Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Wed, 23 Jun 2010 01:07:31 +0200 Subject: [PATCH] udev-151: Modified mount.sh so that spaces in LABELS are also working --- recipes/udev/udev-151/omap3-pandora/mount.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/recipes/udev/udev-151/omap3-pandora/mount.sh b/recipes/udev/udev-151/omap3-pandora/mount.sh index 0819def388..5f20c8577c 100755 --- a/recipes/udev/udev-151/omap3-pandora/mount.sh +++ b/recipes/udev/udev-151/omap3-pandora/mount.sh @@ -11,7 +11,7 @@ UMOUNT="/bin/umount" blkid="/usr/sbin/blkid" name="`basename "$DEVNAME"`" name2="`$blkid "$DEVNAME" -o value -s LABEL`" - +name3=$(echo $DEVNAME | sed 's/.*dev.//g') for line in `cat /etc/udev/mount.blacklist | grep -v ^#` do @@ -40,7 +40,8 @@ automount() { rm_dir "/media/$name" else logger "mount.sh/automount" "Auto-mount of [/media/$name] successful" - touch "/tmp/.automount-$name" + touch "/tmp/.automount-$name3" + echo $name3 > /tmp/test fi } @@ -76,10 +77,12 @@ if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then 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 - # left around all the time. - $UMOUNT -l $mnt + # left around all the time. | cut -d ' ' -f 2 | sed 's/\\040/ /g' + mnt2=$(echo $mnt | sed 's/\\040/ /g') + $UMOUNT -l "$mnt2" done # Remove empty directories from auto-mounter - test -e "/tmp/.automount-$name" && rm_dir "$mnt" + + test -e "/tmp/.automount-$name3" && rm_dir "$mnt2" fi -- 2.39.5