Re: how to suppress write_net_rules (prevent alteration of my net rules)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 19, 2011 at 17:58, John Lumby <johnlumby@xxxxxxxxxxx> wrote:
>
> Is there any supported way of telling udev never to create, append or alter my /etc/udev/rules.d/70-persistent-net.rules ?
> It appears that by default a script called /lib/udev/write_net_rules will always do so,
> although I can't find this documented anywhere other than inside the Â/etc/udev/rules.d/70-persistent-net.rules.
>
> The reason I want to prevent this is that I have one special requirement:
> Â that any net interface that is named eth0 by the kernel must never be renamed.
> (This is for ensuring that running root over nfs works without hiccup).
> I can specify this restriction in my /etc/udev/rules.d/60-net.rules by
> ÂSUBSYSTEM=="net", .... , KERNEL!="eth0", NAME="eth[n]"
> which worksÂÂ --ÂÂ but then along comes /lib/udev/write_net_rules and creates or appends
> /etc/udev/rules.d/70-persistent-net.rules with conflicting specifications.
>
> So I want to stop it from doing that.ÂÂÂ The only way I have found is to edit this script
> and change the string "/etc/udev/rules.d/70-persistent-net.rule" to "/tmp/70-persistent-net.rules"
> but I suppose that change gets wiped out whenever I upgrade the software.
>
> Is there any properly supported way of specifying this?

Rules in /etc over-rule rules in /lib with the same name.

echo "# disable net-generator rules in /lib/udev" > \
  /etc/udev/rules.d/75-persistent-net-generator.rules

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


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux