#!/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 umount any removed devices
+
MOUNT="/bin/mount"
PMOUNT="/usr/bin/pmount"
UMOUNT="/bin/umount"
-name="`basename "$DEVNAME"`"
-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
done
automount() {
+ name="`basename "$DEVNAME"`"
+
! test -d "/media/$name" && mkdir -p "/media/$name"
if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
fi
# If the device isn't mounted at this point, it isn't configured in fstab
- cat /proc/mounts | awk '{print $1}' | grep -q "^$DEVNAME$" || automount
-
+ grep -q "^$DEVNAME " /proc/mounts || automount
fi
done
# Remove empty directories from auto-mounter
+ name="`basename "$DEVNAME"`"
test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
fi
the hotplug package and requires a kernel not older than 2.6.12."
RPROVIDES_${PN} = "hotplug"
-PR = "r1"
+PR = "r2"
SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://noasmlinkage.patch;patch=1 \