http://wiki.contribs.org/USBDisks#USB_on_SME_8One of my USB drives is a Western Digital My Passport. As best as I can tell, the script documented on the USBDisks wiki page is not working for this device. It's displaying a CDROM device instead of the ext3 device.
[root@luna /]# hal-find-by-property --key volume.fsusage --string filesystem |
> while read udi ; do
> # ignore optical discs
> if "$(hal-get-property --udi $udi --key volume.is_disc)" == "false" ; then
> dev=$(hal-get-property --udi $udi --key block.device)
> fs=$(hal-get-property --udi $udi --key volume.fstype)
> lb=$(hal-get-property --udi $udi --key volume.label)
> echo $dev": label "$lb",file system: "$fs ",uid: "$udi
> fi
> done
/dev/sr1: label WD SmartWare,file system: udf ,uid: /org/freedesktop/Hal/devices/volume_label_WD_SmartWare
[root@luna /]#
If I add "test" to the if statement, the script seems to work correctly.
[root@luna /]# hal-find-by-property --key volume.fsusage --string filesystem |
> while read udi ; do
> # ignore optical discs
> if test "$(hal-get-property --udi $udi --key volume.is_disc)" == "false" ; then
> dev=$(hal-get-property --udi $udi --key block.device)
> fs=$(hal-get-property --udi $udi --key volume.fstype)
> lb=$(hal-get-property --udi $udi --key volume.label)
> echo $dev": label "$lb",file system: "$fs ",uid: "$udi
> fi
> done
/dev/sdb1: label ,file system: ext3 ,uid: /org/freedesktop/Hal/devices/volume_uuid_f396fe77_0d99_47a6_8f8a_03cb82acdce9
[root@luna /]#
Should this be changed in the wiki?