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 7:58 PM, 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?
>

/lib/udev/rules.d/75-persistent-net-generator.rules should not call
write_net_rules if NAME is already set, so

KERNEL=="eth0", NAME="eth0"

may do the trick.
--
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