Skip to contentSkip to conversation

A rule gets applied only after running `udevadm test`

DISCUSSION Rogutės Sparnuotos 2 participants 4 messages Mar 4, 2012 – Mar 5, 2012

lore
Share & tools
lore
#0 lore raw

I have 2 custom rules to rename network interfaces:

SUBSYSTEM="net", ACTION="add", ATTR{address}="00:1f:d0:5a:7d:48", NAME="eth_int"
SUBSYSTEM="net", ACTION="add", ATTR{address}="00:50:22:e9:7d:09", NAME="eth1"

But they aren't triggered on boot (although another rule from the same file is applied). Now if I run

$ udevadm test --action­d \
/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/net/eth1
$ udevadm test --action­d \
/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.0/net/eth0

the interfaces get renamed. What could I do to make these rules work on boot? Could this be an udev bug caused by a module-less kernel?

#1 lore raw
Quoted 10 lines · RogutÄ—s Sparnuotos

I have 2 custom rules to rename network interfaces:

SUBSYSTEM="net", ACTION="add", ATTR{address}="00:1f:d0:5a:7d:48", NAME="eth_int"
SUBSYSTEM="net", ACTION="add", ATTR{address}="00:50:22:e9:7d:09", NAME="eth1"

But they aren't triggered on boot (although another rule from the same file is applied). Now if I run

Quoted 8 lines
$ udevadm test --action­d \
/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/net/eth1
$ udevadm test --action­d \
/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.0/net/eth0

the interfaces get renamed. What could I do to make these rules work on boot? Could this be an udev bug caused by a module-less kernel?

Does:
udevadm trigger --action­d
make it work the same way as running 'udevadm test'? Then it's more likely an issue with your init system/bootup logic and not with udev.

Kay

#2 lore raw
In reply to Rogutės Sparnuotos
Quoted 20 lines · Kay Sievers
Quoted 10 lines · RogutÄ—s Sparnuotos

I have 2 custom rules to rename network interfaces:

SUBSYSTEM="net", ACTION="add", ATTR{address}="00:1f:d0:5a:7d:48", NAME="eth_int"
SUBSYSTEM="net", ACTION="add", ATTR{address}="00:50:22:e9:7d:09", NAME="eth1"

But they aren't triggered on boot (although another rule from the same file is applied). Now if I run

Quoted 8 lines
$ udevadm test --action­d \
/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/net/eth1
$ udevadm test --action­d \
/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.0/net/eth0

the interfaces get renamed. What could I do to make these rules work on boot? Could this be an udev bug caused by a module-less kernel?

Quoted 6 lines

Does:

   udevadm trigger --action­d

make it work the same way as running 'udevadm test'? Then it's more likely an issue with your init system/bootup logic and not with udev.

Kay

Thank you for the hint, you were right.

IIRC, a mere udevadm trigger used to work and now I see that Archlinux's initscripts have
udevadm trigger --action­d --type=subsystems udevadm trigger --action­d --typeÞvices

#3 lore raw
In reply to Rogutės Sparnuotos
Quoted 4 lines · RogutÄ—s Sparnuotos

IIRC, a mere udevadm trigger used to work and now I see that Archlinux's initscripts have

 udevadm trigger --action­d --typeÞvices

That type of trigger should work fine.

Kay