[systemd-devel] udev rules environment variable

Andrey Borzenkov arvidjaar at gmail.com
Wed Dec 18 08:09:47 PST 2013


В Wed, 18 Dec 2013 02:52:01 +0100
Kay Sievers <kay at vrfy.org> пишет:

> On Tue, Dec 17, 2013 at 8:14 PM, Andrey Borzenkov <arvidjaar at gmail.com> wrote:
> > В Tue, 17 Dec 2013 19:59:47 +0100 Kay Sievers <kay at vrfy.org> пишет:
> 
> >> # modprobe dummy
> >
> > dummy is not renamed.
> 
> > UDEV  [80256.274447] move     /devices/pci0000:00/0000:00:03.0/net/ens3 (net)
> > ACTION=move
> > ...
> > INTERFACE=ens3
> > SEQNUM=1452
> > ...
> > TAGS=:systemd:
> > UDEV_LOG=7
> >
> > Oops. test_device is lost.
> 
> Adding something like:
>   ACTION!="add|remove", IMPORT{db}="test_device"
> 
> might make it work.
> 

But it does not really scale. It needs to be done individually for every
single prperty. E.g. INTERFACE_OLD added by udev itself is lost as well.

And if even you did not remember this behavior what chances are that
others will?

For "move" event the only thing that changes is interface name. From
the udev pov not even path to database is changed (IFINDEX is the
same). So I think udev should import all existing properties by default
because this is really the same device with the same properties (as
opposed to "change" even where properties are not known in advance).


More information about the systemd-devel mailing list