On Thu, Dec 26, 2002 at 06:11:06PM -0800, Bill Moseley wrote:
> 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
> /etc/hotplug/hotplug.functions).

Yeah, the visor driver claims the device as soon as it appears on the USB
bus the second time, since it's already loaded.  Hotplug is smart enough
not to try loading it again.

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

Sure.  Just have your action script unload it explicitly:

$ cat /etc/hotplug/usb/visor
#!/bin/sh
/bin/su mwilson -c /usr/local/bin/coldsync
/sbin/rmmod visor usbserial

Then the next go-round, hotplug will note that the module isn't already
loaded and will reload it.

-- 
 Marc Wilson |     We don't care how they do it in New York.
 [EMAIL PROTECTED] |


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to