I have installed SME 6.0 w/ raid to provide failover support. In addition to this I am trying to create a means for offsite backups through an external USB hard drive. When connected, SME detects the hard drive correctly and loads the usb-storage module, and I have written a script to mount the drive, perform a backup, unmount the drive, and send an email to a user when the backup is finished. What I am trying to do is to get this script to run automatically when the drive is plugged in so the user does not need to do anything when the drive is plugged in. Then when they get the email they know the task is complete and they can remove the drive and take it off site.
I have read documentation about hotplug and instructions for having scripts automatically run. For example, I have added my script to the /etc/hotplug/usb directory, and I have added an entry in usb.handlemap for this particular device:
backup_script 0x0003 0x0d49 0x7000 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
I was wondering if anyone has utilized usb connection scripts for items such as cameras, memory sticks, or external hard drives and if they needed to change anything in the hotplug.agent
Any help would be greatly appreciated.