Package: usbmount
Version: 0.0.14
Followup-For: Bug #350633

Hi,

I attached a patch against the usbmount skript that mounts devices with
entries in /etc/fstab using that.

Thanks,
Joachim

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15.otto
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages usbmount depends on:
ii  lockfile-progs                0.1.10     Programs for locking and unlocking
ii  udev                          0.084-1    /dev/ and hotplug management daemo

usbmount recommends no packages.

-- no debconf information
--- usbmount-orig       2006-02-02 19:49:47.000000000 +0100
+++ usbmount    2006-02-02 20:10:43.000000000 +0100
@@ -82,10 +82,19 @@
        exit 1
     fi
 
+    # Test if the device has an /etc/fstab entry. In that case, we will
+    # mount it using the regular mount command.
+    if grep -q "^[     ]*$DEVNAME" < /etc/fstab; then 
+        log debug "$DEVNAME has an /dev/fstab entry, using that"
+
+       # Mount the filesystem.
+       log info "executing command: mount $DEVNAME" 
+       mount "$DEVNAME"
+
     # Test if the device contains a filesystem.  If it doesn't, no
     # 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
+    elif /sbin/vol_id "$DEVNAME" | egrep -q 
'^ID_FS_USAGE=(filesystem|disklabel)$'; then
        log debug "$DEVNAME contains a filesystem or disklabel"
 
        fstype="`/sbin/vol_id -t \"$DEVNAME\"`"

Reply via email to