Run script on USB thumb drive connection
Cameron Hutchison
lists at xdna.net
Tue Feb 17 00:25:40 UTC 2009
Bill Moseley <moseley at hank.org> writes:
>It's still getting mounted by gnome (I assume) after the script runs.
>That's the part I'm wondering about -- how to stop that from happening
>for this specific thumb drive.
I use the following to stop auto-mounting of my hot-swap backup hard
drives:
I have created the file /etc/hal/fdi/policy with the following contents:
Adjust the UUIDs for your case.
---8<---
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<!--
System policy to not automount the backup disks.
-->
<deviceinfo version="0.2">
<!-- Backup disc 1 - Seagate ST3160811AS 7200.9 160GB -->
<device>
<match key="volume.uuid" string="854a1d9e-916d-46af-9ba3-ae0fab3644ab">
<merge key="volume.ignore" type="bool">true</merge>
</match>
</device>
<!-- Backup disc 2 - Seagate ST3160811AS 7200.9 160GB -->
<device>
<match key="volume.uuid" string="cd630507-37dd-46e8-9bdd-33fdbd0edf42">
<merge key="volume.ignore" type="bool">true</merge>
</match>
</device>
</deviceinfo>
---8<---
More information about the ubuntu-users
mailing list