Gentoo Archives: gentoo-embedded

From: Ned Ludd <solar@g.o>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] Getting "new device" events
Date: Fri, 09 Feb 2007 18:55:11
Message-Id: 1171047255.27242.11.camel@onyx.private.gni.com
1 On Fri, 2007-02-09 at 12:29 +0100, Peter Poulsen wrote:
2 > <snip>
3 > >>
4 > >> In udev I would use the RUN+=... argument in the udev rule, but I'm
5 > >> looking for an alternativ.
6 > >
7 > > You can run whatever code you want when a device is attatched or
8 > > detattched with mdev.
9 > >
10 > > /etc/mdev.conf:
11 > >
12 > > sd[a-z][0-9]* root:disk 0660 */usr/local/bin/newusbdisk.sh
13 > >
14 > >
15 > > Wil execute /usr/local/bin/newusbdisk.sh every time an usbdisk is either
16 > > attatched or detached.
17 > >
18 > >
19 > Thanks. I (as you probably guessed) didn't know that :-)
20
21 I don't think it was mentioned but don't forget to set
22 sysctl -w kernel.hotplug=/sbin/mdev
23 in order for everything to work.
24
25 --
26 Ned Ludd <solar@g.o>
27 Gentoo Linux
28
29 --
30 gentoo-embedded@g.o mailing list