Run script on USB thumb drive connection

Leonard Chatagnier lenc5570 at sbcglobal.net
Wed Feb 25 17:28:42 UTC 2009


--- On Wed, 2/25/09, Bill Moseley <moseley at hank.org> wrote:

> From: Bill Moseley <moseley at hank.org>
> Subject: Re: Run script on USB thumb drive connection
> To: "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com>
> Date: Wednesday, February 25, 2009, 8:58 AM
> On Tue, Feb 17, 2009 at 12:25:40AM -0000, Cameron Hutchison
> wrote:
> > 
> > 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>
> 
> Thanks Cameron,
> 
> How do determine the UUID for the device?
> 
Make sure you have libblkid1 installed(at least that's the name in Intrepid) and then run from a CLI:

blkid /dev/<block ID name> usually sda(x) or hda(x) and the output will give it to you.


Leonard Chatagnier
lenc5570 at sbcglobal.net






More information about the ubuntu-users mailing list