tags 317022 + patch
thanks
On Wed, Jul 06, 2005 at 12:28:30AM +0800, WANG WenRui wrote:
> There is no /sbin/udev_volume_id in the new udev package, so usbmount
> failed to mount, syslog reads:
>
> cannnot execute /sbin/udev_volume_id
Hi,
Thank you for the bug report.
I'll have a new usbmount version ready in two or three days. Another
change which would break usbmount is planned for the next udev version
(support for /etc/dev.d will be dropped), so I want to fix both issues
at the same time.
In the meantime, you can make usbmount work again by applying the
attached patch to /usr/share/usbmount/usbmount.
Cheers,
Martin
Index: usbmount
===================================================================
--- usbmount (revision 28)
+++ usbmount (revision 29)
@@ -40,9 +40,8 @@
test -n "$FILESYSTEMS" || { log err "FILESYSTEMS not set"; exit 1; }
test -n "$MOUNTOPTIONS" || { log err "MOUNTOPTIONS not set"; exit 1; }
-# Test if /sbin/udev_volume_id is executable.
-test -x /sbin/udev_volume_id \
- || { log err "cannnot execute /sbin/udev_volume_id"; exit 1; }
+# Test if /sbin/vol_id is executable.
+test -x /sbin/vol_id || { log err "cannnot execute /sbin/vol_id"; exit 1; }
umask 022
@@ -82,13 +81,12 @@
fi
# Test if the device contains a filesystem. If it doesn't, no
- # further action is required, but calling udev_volume_id has the
- # side effect that the partition table is read and partition
- # devices are created.
- if /sbin/udev_volume_id "$DEVNAME" | egrep -q
'^F:(filesystem|disklabel)$'; then
+ # further action is required, but calling vol_id has the side effect
+ # that the partition table is read and partition devices are created.
+ if /sbin/vol_id "$DEVNAME" | egrep -q
'^ID_FS_USAGE=(filesystem|disklabel)$'; then
log debug "$DEVNAME contains a filesystem or disklabel"
- fstype="`/sbin/udev_volume_id -t \"$DEVNAME\"`"
+ fstype="`/sbin/vol_id -t \"$DEVNAME\"`"
log debug "$DEVNAME contains filesystem type $fstype"
# Test if the filesystem type is in the list of filesystem