From: Kay Sievers Date: Mon, 12 Mar 2007 16:51:04 +0000 Subject: Re: [PATCH] udev+ifrename integration Message-Id: <1173718264.4270.11.camel@pim.off.vrfy.org> List-Id: References: <20070307194435.GA22264@bougret.hpl.hp.com> In-Reply-To: <20070307194435.GA22264@bougret.hpl.hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Mon, 2007-03-12 at 09:07 -0700, Jean Tourrilhes wrote: > On Sat, Mar 10, 2007 at 02:28:13PM +0100, Kay Sievers wrote: > >=20 > > Oh, I think we should just match on a DEVPATH variable to import. Any > > external tool, not limited to the INTERFACE variable, that causes the > > kernel to change the devpath, would just need to pass the new value for > > udev to update all internal values like %k %n %p. >=20 > I'm sorry, but I don't get it. > First, I don't see how the other internal variables are > updated. sysfs_device_set_values(udev->dev, value, NULL, NULL); will do this with the value of DEVPATH passed by the tool. The tool called by IMPORT=3D will return: DEVPATH=3D/... and whatever it "thinks" is useful here, like the new INTERFACE name. If udev finds DEVPATH, it will update %p %k %n. All other variables just set or replace the current event environment. > Maybe a sample of rules would help me. SUBSYSTEM=3D"net", ACTION=3D"add", IMPORT=3D"/sbin/ifrename --export -i %k" > Second, I don't see how this would prevent subsequent naming > rules to apply. We can make NAME=3D"" work, to prevent other NAME rules from matching. For now NAME=3D"%k" may already work. Kay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel