From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A9D815AD5 for ; Thu, 21 Dec 2023 08:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="x6mZLXaQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E2C4C433C7; Thu, 21 Dec 2023 08:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1703146680; bh=Q0v6VvyzRap6dGneHsLRgp12cPMPioEqA/vcKjS9vGk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x6mZLXaQmrHZmNVzHsMCiIuyxdUzHYyqp/3cmkdKrhT35ponezcJlU6BbqrRcZQy5 CNFop2Jc1Tm64WKddtFQQ7NHjn8haXX41jOboA1WU6kmGqZjWHMkwoBS3Is3J6dPtf vO0cSheFqRGdM4aUl1gT6ArwgUN9Lr3Z9SzQB+is= Date: Thu, 21 Dec 2023 09:17:58 +0100 From: Greg KH To: pgnd Cc: linux-hotplug@vger.kernel.org Subject: Re: udev rule in /etc/udev/rules.d/ FAILS to exec on boot; but OK exec @ shell after boot ? Message-ID: <2023122117-outlet-generic-f184@gregkh> References: Precedence: bulk X-Mailing-List: linux-hotplug@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 20, 2023 at 07:33:06PM -0500, pgnd wrote: > 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? Are you sure that your rule is running after the interface is renamed? Try running 'udevadm monitor' to watch the events to ensure they are what you think they are. Anyway, try asking on the systemd mailing list, which is where udev help can be found, this list really isn't alive anymore at all, sorry. good luck! greg k-h