Question on mdev's custom command invocation
Didier Kryn
kryn at in2p3.fr
Thu Nov 17 10:02:37 UTC 2016
Le 16/11/2016 18:37, Olivier Brunel a écrit :
> On Wed, 16 Nov 2016 16:27:12 +0100
> Didier Kryn<kryn at in2p3.fr> wrote:
>
>> > Hello.
>> >
>> > I'm willing to create/delete symlinks in /dev/disk/by-uuid and
>> >/dev/disk/by-label . For this, I've written a script and added the
>> >following lines to /etc/mdev.conf:
>> >sd[a-z][0-9]* root:disk 660 */sbin/mdev-disk
>> >hd[a-z][0-9]* root:disk 660 */sbin/mdev-disk
>> >
>> > Note that I use /dev/mdev.seq to serialize events.
>> >
>> > Is there a means for my script mdev-disk to determine if the
>> >device is being inserted or extracted? For example it would be easy
>> >if mdev provided the uevent's action (add, remove)
> I'm assuming you already use environment variables in your script,
> e.g. $MDEV, $SEQNUM, etc Maybe you missed $ACTION, sounds like what
> you're looking for.
Good to know that;
https://git.busybox.net/busybox/plain/docs/mdev.txt only mentions $MDEV .
Thanks a lot.
Didier
More information about the busybox
mailing list