Le 16/11/2016 18:37, Olivier Brunel a écrit :
On Wed, 16 Nov 2016 16:27:12 +0100
Didier Kryn<k...@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

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to