Skip to contentSkip to conversation

Is this the official hotplug ?

DISCUSSION Matts Kivik 2 participants 4 messages Aug 4, 2001 – Aug 5, 2001

lore
Share & tools
lore
#0 lore raw

I have seen there is also a hotplug deamon called usbmgr.

Is any of theese the official one ?
Clearly there is only room for one, unless they are somewhat compatible, as a developer I cant develop hotplug features for more than one hotplug handler for my piece of usb hotplug device.

_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 3 lines · Matts Kivik

I have seen there is also a hotplug deamon called usbmgr.

Is any of theese the official one ?

Well, only the /sbin/hotplug mechanism is actually called "hotplug" and has direct kernel support. It's referenced in the kernel config help for CONFIG_HOTPLUG. All in all, I think it has more of a claim to being "official" than "usbmgr".

Actually a key part of the idea was to get away from the need to have an extra daemon running all the time, consuming system resources.

- Dave

Quoted 4 lines

Clearly there is only room for one, unless they are somewhat compatible, as a developer I cant develop hotplug features for more than one hotplug handler for my piece of usb hotplug device.

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Matts Kivik

Thanks for your answer. Do you know where I can find information on what happens when I plug a device to the usb port. I can see that /proc/bus/usb/devices gets information on my device. Now I would like to start a program, or script when this happens (ONLY when a certain device is inserted), how shall I do that, (on a standard production pre compiled generally distrubuted kernel (Mandrake/RedHat....)).

--- David Brownell <[email protected]>

Quoted 25 lines

wrote:

Quoted 3 lines · Matts Kivik

I have seen there is also a hotplug deamon called usbmgr.

Is any of theese the official one ?

Well, only the /sbin/hotplug mechanism is actually called "hotplug" and has direct kernel support. It's referenced in the kernel config help for CONFIG_HOTPLUG. All in all, I think it has more of a claim to being "official" than "usbmgr".

Actually a key part of the idea was to get away from the need to have an extra daemon running all the time, consuming system resources.

- Dave

Quoted 4 lines

Clearly there is only room for one, unless they are somewhat compatible, as a developer I cant develop hotplug features for more than one hotplug handler for my piece of usb hotplug device.

Quoted 4 lines

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Matts Kivik
Quoted 2 lines

Thanks for your answer. Do you know where I can find information on what happens when I plug a device to the usb port.

Some is at http://linux-hotplug.sourceforge.net/?selected=usb
but that's just focussing on the hotplug-related stuff, not describing usbdevfs or how the kernel manages enumeration.

Quoted 1 line

I can see that /proc/bus/usb/devices gets information on my device.

Good, the kernel didn't have problems enumerating it.

Quoted 3 lines

Now I
would like to start a program, or script when this happens (ONLY when a certain device is inserted), how shall I do that,

One example: http://jphoto.sourceforge.net/?selected=sync
That runs a script to download images from one type of camera, when it's hooked up. Similar setups have been used to download device firmware, start PDA hotsync daemons, and so on. (I suppose the hotplug site should get an example too...)

If you need to load a kernel driver _and_ run a script, then the name of the module and script should be the same; you won't even need to modify usb.handmap if your driver is written correctly (using MODULE_DEVICE_TABLE so that "depmod" does its magic).

- Dave

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel