1 |
On Fri, 2007-02-09 at 10:03 +0100, Peter Poulsen wrote: |
2 |
> <snip> |
3 |
> >> |
4 |
> >> To sum up: does anybody know of ways to execute some commands/code |
5 |
> >> whenever a new device (from the list above), is added? |
6 |
> > |
7 |
> > busybox mdev. |
8 |
> > |
9 |
> Thanks, it certainly gets some of the work I want. However, I need to |
10 |
> execute some code that will inform the user that a new device has been |
11 |
> detected. So what I'm looking for is a "hook" where I can attach my code. |
12 |
> |
13 |
> In udev I would use the RUN+=... argument in the udev rule, but I'm |
14 |
> looking for an alternativ. |
15 |
|
16 |
You can run whatever code you want when a device is attatched or |
17 |
detattched with mdev. |
18 |
|
19 |
/etc/mdev.conf: |
20 |
|
21 |
sd[a-z][0-9]* root:disk 0660 */usr/local/bin/newusbdisk.sh |
22 |
|
23 |
|
24 |
Wil execute /usr/local/bin/newusbdisk.sh every time an usbdisk is either |
25 |
attatched or detached. |
26 |
|
27 |
|
28 |
> /peter |
29 |
> |
30 |
|
31 |
-- |
32 |
gentoo-embedded@g.o mailing list |