[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Hotplug and unloading modules

I have a USB Palm m505 device.  Hotplug works, but I'm trying to get it to
run a script when I push the hotsync button.

If the visor module is not loaded then hotplug runs the usb.agent script
and that loads the visor module and then runs /etc/hotplub/usb/visor,
which is where I'd then run jpilot-sync.

This works fine the first time, but then the visor module is left
installed.  The problem is that the next time hotsync button is pushed the
usb.agent script runs again, but since the visor module is already loaded
/etc/hotplug/usb/visor does not run (see the load_drivers function in

Is there a way to either unload the modules automatically on hotplug
disconnect so that it will run my script again on next hotsync?

Bill Moseley moseley@hank.org

Reply to: