On Fri, 2007-02-09 at 10:03 +0100, Peter Poulsen wrote: > <snip> > >> > >> To sum up: does anybody know of ways to execute some commands/code > >> whenever a new device (from the list above), is added? > > > > busybox mdev. > > > Thanks, it certainly gets some of the work I want. However, I need to > execute some code that will inform the user that a new device has been > detected. So what I'm looking for is a "hook" where I can attach my code. > > In udev I would use the RUN+=... argument in the udev rule, but I'm > looking for an alternativ.
You can run whatever code you want when a device is attatched or detattched with mdev. /etc/mdev.conf: sd[a-z][0-9]* root:disk 0660 */usr/local/bin/newusbdisk.sh Wil execute /usr/local/bin/newusbdisk.sh every time an usbdisk is either attatched or detached. > /peter > -- [email protected] mailing list
