Updated mdev
Frank Sorenson
frank at tuxrocks.com
Tue Dec 13 09:42:15 UTC 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rob Landley wrote:
> On Tuesday 13 December 2005 02:27, Frank Sorenson wrote:
> Um, I took your previous version and extensively rewrote it myself.
Okay. I knew I should have waited to see what you cooked up :)
> I chopped out the hotplug with an eye to adding it back later. Is the netlink
> stuff the only way to do this, or does /sbin/hotplug still work?
/sbin/hotplug will work as well. Changing /proc/sys/kernel/hotplug to
mdev appears to execute mdev with one argument (the subsystem) and
several environment variables (these are the ones I've observed. There
may be more):
ACTION - set to either "add" or "remove"
DEVPATH - set to the path inside /sys where the dev entry can be found
SUBSYSTEM - the subsystem the device belongs to
PHYSDEVBUS
PHYSDEVDRIVER
SEQNUM - a counter of the number of events
MAJOR
MINOR
ACTION, DEVPATH, MAJOR, and MINOR appear to be the most useful.
Some examples (ACTION DEVPATH MAJOR:MINOR):
add /block/sda/sda1 8:1
add /class/misc/tun 10:200
remove /class/misc/tun 10:200
remove /block/sda 8:0
remove /class/usb_device/usbdev1.32 189:31
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank at tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDnpd3aI0dwg4A47wRAgb0AJ9x3ICN/FSVeW1axxSAnqLeEEVFUgCfddnq
+b40gVcReU+FH5oic9rWoBk=
=GmIp
-----END PGP SIGNATURE-----
More information about the busybox
mailing list