howto 'hotplug' a usb memory then autorun a command
Dear Forum
Specific directions for help here are proving to be elusive. After a usb memory stick is plugged into a particular computer, I would like a script to initiate the firebird database backup command (the ./gbak command). Then would it be possible to automatically unmount the device (i.e. usb LED goes out indicating it can be removed)?
The OS is centos 4.3 - that has 'hot plugging' functionality as I understand.
So I imagine:
-(whatever scripts to have a specific usb stick recognised and mounted)
-cd /opt/firebird/bin
-./gbak -v -b -user -password /opt/firebird/database_file /usb_device/
-then a script to automatically unmount the usb device (i.e. light goes out) so I can see its finiished
After I obtain a usb memory stick, does it need to be formatted in any particular way for linux?
Appreciate any help!
Regards
Michael from Melbourne
Australia
|