Date: Mon, 29 Sep 2008 21:27:36 +0200 From: Zahemszky =?ISO-8859-2?Q?G=E1bor?= <Gabor@Zahemszky.HU> To: freebsd-questions@freebsd.org Subject: Writing hald .fdi files Message-ID: <20080929212736.70634956@Picasso.Zahemszky.HU>
next in thread | raw e-mail | index | archive | help
Hi! I've bought an external disk. I can mount it by hand, with mount -t msdosfs -o large /dev/xxx /mnt command. (I have to use the "-o large" option.) I use XFCE4, with Thunar-volman-plugin. When I plug my new disk in, I got a message box: Cannot mount, try with "-o large" option. So I'd like to say to the "automounter" of Thunar, to use the mount_msdosfs command with that "-o large" option. After some googling, I found HAL specification on http://webcvs.freedesktop.org/hal/hal/doc/spec/hal-spec.html?view=3Dco&path= rev=3DHEAD and wrote that .fdi file: =3D=3D /usr/local/share/hal/fdi/policy/30user/10-add-mount-option-for-Verba= tim.fdi =3D=3D <?xml version=3D"1.0" encoding=3D"UTF-8"?> <deviceinfo version=3D"0.2"> <device> <match key=3D"block.device" string=3D"/dev/msdosfs/VERBATIM"> <match key=3D"info.category" string=3D"volume"> <merge key=3D"volume.policy.mount_option.large" type=3D"bool">true= </merge> </match> </match> </device> </deviceinfo> =3D=3D=3D=3D My problem is: after plugging my disk in, in lshal output, I can see the ne= w key: volume.policy.mount_option.large ( =3D true) , but got the same error messa= ge about the mounting problem. I tried it with Linux (+GNOME). Linux can mount my disk, so I tried to mount with read-only flag. The same problem: I can see my new key, but it hasn't got any effect (well, it has. without my .fdi file, it can mount = with rw, but with my .fdi file, it cannot mount. Neither rw, nor ro.) So my question: how can I make an .fdi file, which tells to these "automoun= ters": if this is device X from vendor Y, mount it with mount option XY! Thanks, G=E1bor --=20 #!/bin/ksh Z=3D'21N16I25C25E30, 40M30E33E25T15U!';IFS=3D' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set -- $Z;for i;{ [[ $i =3D ? ]]&&print $i&&break;[[ $i =3D ??? ]]&&j=3D$i&&i=3D${i%?};typeset -i40 i=3D8#$i;print -n ${i#???};[[ "= $j" =3D ??? ]]&&print -n "${j#??} "&&j=3D;typeset +i i;};IFS=3D' 0123456789 ';s= et -- $Z;for i;{ [[ $i =3D , ]]&&i=3D2;[[ $i =3D ?? ]]||typeset -l i;j=3D"$j $i";typeset +l i;};print "$j"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080929212736.70634956>