Discussion:
A rule gets applied only after running `udevadm test`
Rogutės Sparnuotos
2012-03-04 21:00:29 UTC
Permalink
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=add \
/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/net/eth1

$ udevadm test --action=add \
/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?

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Kay Sievers
2012-03-04 23:48:34 UTC
Permalink
SUBSYSTEM=3D=3D"net", ACTION=3D=3D"add", ATTR{address}=3D=3D"00:1f:d0=
:5a:7d:48",
NAME=3D"eth_int"
SUBSYSTEM=3D=3D"net", ACTION=3D=3D"add", ATTR{address}=3D=3D"00:50:22=
:e9:7d:09",
NAME=3D"eth1"
But they aren't triggered on boot (although another rule from the sam=
e
file is applied). Now if I run
$ udevadm test --action=3Dadd \
/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/net/eth1
$ udevadm test --action=3Dadd \
/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=3Dadd
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
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug=
" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Rogutės Sparnuotos
2012-03-05 11:08:00 UTC
Permalink
Post by Kay Sievers
SUBSYSTEM=3D=3D"net", ACTION=3D=3D"add", ATTR{address}=3D=3D"00:1f:d=
0:5a:7d:48",
Post by Kay Sievers
NAME=3D"eth_int"
SUBSYSTEM=3D=3D"net", ACTION=3D=3D"add", ATTR{address}=3D=3D"00:50:2=
2:e9:7d:09",
Post by Kay Sievers
NAME=3D"eth1"
But they aren't triggered on boot (although another rule from the sa=
me
Post by Kay Sievers
file is applied). Now if I run
$ udevadm test --action=3Dadd \
/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/net/eth1
$ udevadm test --action=3Dadd \
/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
Post by Kay Sievers
boot? Could this be an udev bug caused by a module-less kernel?
udevadm trigger --action=3Dadd
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=20
Archlinux's initscripts have
udevadm trigger --action=3Dadd --type=3Dsubsystems
udevadm trigger --action=3Dadd --type=3Ddevices

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug=
" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Kay Sievers
2012-03-05 16:38:36 UTC
Permalink
IIRC, a mere `udevadm trigger` used to work and now I see that Archli=
nux's
initscripts have
=C2=A0udevadm trigger --action=3Dadd --type=3Ddevices
That type of trigger should work fine.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug=
" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...