How do I run a script or a program when a file system is mounted?



Hi, I would like to make an application that runs as automatically as possible. When the user inserts media such as a USB disk or a CD-ROM, and the /etc/fstab allows automatic mounting (or it is mounted automatically by some daemon), then a script or a program on that file system is run automatically.

Can this be done? I haven't seen anything like it in any of the documentation on the mount(8) command, nor has a google search produced any reasonable results.


Many thanks,


Jeff
.



Relevant Pages

  • Re: How do I run a script or a program when a file system is mounted?
    ... Jeff Silverman wrote: ... When the user inserts media such as a USB disk or a CD-ROM, and the /etc/fstab allows automatic mounting, then a script or a program on that file system is run automatically. ...
    (comp.os.linux)
  • Re: Unable saving to DVD-rom
    ... one-write media, where as the -Rom designation indicates a read-only device. ... A CD-R, once burned and finalized, becomes a CD-Rom. ... Rick Rogers aka "Nutcase" MS-MVP - Windows ...
    (microsoft.public.windowsxp.general)
  • Re: Using GET_CONFIGURATION_IOCTL_INPUT in a CD application.
    ... We want this application not to execute from any media other than ... I have with me Windows DDK XP SP1 and am able to compile the ... from any media other than CD-ROM." ... In the event you are trying to do this from a driver get a good book. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Blockbuster picks Blu-Ray - questions
    ... the content on the disc, ... CD-ROM may contain software, but the physical CD-ROM itself is not ... software, it's a media format. ... to computer programming, but the other media was around long before ...
    (rec.arts.movies.current-films)
  • Re: SetupDixxx
    ... Do you want to just eject the CD media or USB disk, ... the device driver for it as well? ... RemoveDevice does the latter. ...
    (microsoft.public.win32.programmer.kernel)