hal/tools hal-system-storage-mount,1.19,1.20
David Zeuthen
david at freedesktop.org
Thu Feb 9 18:49:36 PST 2006
Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv16199/tools
Modified Files:
hal-system-storage-mount
Log Message:
2006-02-09 David Zeuthen <davidz at redhat.com>
* tools/hal-system-storage-mount: Allow passing file system type
for non-pollable drives. This is needed to mount Zip disks as
e.g. 'mount /dev/hdd4 /media/foo' fails but 'mount -t vfat
/dev/hdd4 /media/foo' works.
Index: hal-system-storage-mount
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-storage-mount,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- hal-system-storage-mount 10 Feb 2006 02:40:01 -0000 1.19
+++ hal-system-storage-mount 10 Feb 2006 02:49:34 -0000 1.20
@@ -77,14 +77,18 @@
esac
MOUNTPOINT="$GIVEN_MOUNTPOINT"
-# pass only whitelisted types
+# pass only whitelisted types; allow anything if it's on a non-pollable drive
if [ "$GIVEN_MOUNTTYPE" != "" ]; then
- case "$GIVEN_MOUNTTYPE" in
- *)
- echo "org.freedesktop.Hal.Device.Volume.InvalidFilesystemType" >&2
- echo "Invalid filesystem type." >&2
- exit 1
- esac
+ if [ "$HAL_PROP_STORAGE_MEDIA_CHECK_ENABLED" == "false" ]; then
+ MOUNTTYPE=$GIVEN_MOUNTTYPE
+ else
+ case "$GIVEN_MOUNTTYPE" in
+ *)
+ echo "org.freedesktop.Hal.Device.Volume.InvalidFilesystemType" >&2
+ echo "Invalid filesystem type." >&2
+ exit 1
+ esac
+ fi
fi
# if no type is given, use default name
@@ -155,7 +159,7 @@
fi
if [ "$MOUNTTYPE" != "" ]; then
- MOUNTTYPE_EXPANDED="-t \"$MOUNTTYPE\""
+ MOUNTTYPE_EXPANDED="-t $MOUNTTYPE"
else
MOUNTTYPE_EXPANDED=""
fi
More information about the hal-commit
mailing list