linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev rule in /etc/udev/rules.d/ FAILS to exec on boot; but OK exec @ shell after boot ?
@ 2023-12-21  0:33 pgnd
  2023-12-21  8:17 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: pgnd @ 2023-12-21  0:33 UTC (permalink / raw)
  To: linux-hotplug

hi,

on

	lsb_release -rd
		Description:    Fedora release 39 (Thirty Nine)
		Release:        39
	uname -rm
		6.6.6-200.fc39.x86_64 x86_64

i have this net device

	lspci | grep Ethernet | grep 05:00
		05:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)

i enable persistent naming; in kernel cmdline,

	"... net.ifnames=1 ..."


the interface is renamed/created during boot

	dmesg | grep "renamed from eth"
		[    6.945108] igb 0000:05:00.0 enp5s0: renamed from eth0

i've created a udev rule to set IPv6 params

	cat /etc/udev/rules.d/01-enp5s0-sysctl.rules
		ACTION=="add|bind|change", SUBSYSTEM=="net", KERNEL=="enp5s0", \
		 RUN+="/sbin/sysctl -qw \
		  net.ipv6.conf.enp5s0.forwarding=0 \
		  net.ipv6.conf.enp5s0.accept_ra=1 \
		  net.ipv6.conf.enp5s0.use_tempaddr=1 \
		 "

but, immediately after boot, exec

	sysctl \
	 net.ipv6.conf.enp5s0.forwarding \
	 net.ipv6.conf.enp5s0.accept_ra \
	 net.ipv6.conf.enp5s0.use_tempaddr

returns the values, unchanged,

	net.ipv6.conf.enp5s0.forwarding = 0
	net.ipv6.conf.enp5s0.accept_ra = 0
	net.ipv6.conf.enp5s0.use_tempaddr = 0

otoh, if i exec at shell,

	udevadm trigger
	sysctl \
	 net.ipv6.conf.enp5s0.forwarding \
	 net.ipv6.conf.enp5s0.accept_ra \
	 net.ipv6.conf.enp5s0.use_tempaddr

the values are changed

	net.ipv6.conf.enp5s0.forwarding = 0
	net.ipv6.conf.enp5s0.accept_ra = 1
	net.ipv6.conf.enp5s0.use_tempaddr = 1

what's keeping my udev rule from setting up the interface sysctls on boot?

-pgnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-21 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-21  0:33 udev rule in /etc/udev/rules.d/ FAILS to exec on boot; but OK exec @ shell after boot ? pgnd
2023-12-21  8:17 ` Greg KH
2023-12-21 12:25   ` pgnd
2023-12-21 13:21     ` pgnd
2023-12-21 13:22     ` Andrei Borzenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).