udev 151: Update omap3-pandora mount.sh to do a lazy (-l) umount when a device is...
authorDavid-John Willis <John.Willis@Distant-earth.com>
Thu, 3 Jun 2010 17:58:26 +0000 (18:58 +0100)
committerDavid-John Willis <John.Willis@Distant-earth.com>
Thu, 3 Jun 2010 17:58:26 +0000 (18:58 +0100)
recipes/udev/udev-151/omap3-pandora/mount.sh
recipes/udev/udev_151.bb

index 21440ee..7ba7ba7 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/sh
 #
 # Called from udev
-# Attemp to mount any added block devices 
-# and remove any removed devices
+#
+# Attempt to mount any added block devices and remove any removed devices.
 #
 
 MOUNT="/bin/mount"
@@ -62,7 +62,10 @@ fi
 if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
        for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
        do
-               $UMOUNT $mnt
+               # 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
        done
        
        # Remove empty directories from auto-mounter
index ac14560..15fda19 100644 (file)
@@ -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 = "r9"
+PR = "r10"
 
 # Untested
 DEFAULT_PREFERENCE = "-1"