On Wed, Aug 28, 2019 at 12:26:05PM -0400, Gene Heskett wrote:
> So: delete /etc/udev/rules.d/70-persistent-net.rules AND edit /e/n/i to 
> put it back on eth0 where it belongs and it should work.

Only on machines that have precisely ONE (1) network interface.  On any
machine with more than one, you will have a disaster.

> But I want that file deleted at every bootup before any attempt to use it 
> is made.

How about deleting it during shutdown, instead of during boot?

> So I'm going to go out and see if that can be made to work by 
> deleting that file as the first line of if-up...

It's much too late at that point ... unless your intent was actually
to delete it for the NEXT boot, similar to my suggestion above, in
which you delete it during system shutdown.  In that case, it might
kinda sorta not fail, by accident.  It's certainly not *obvious* that
you're deleting it for the next boot at that point, so the intent of
your changes would be completely opaque to future-you.  I do not
advise it.

A slightly less horrible alternative might be to delete all the
non-comment lines from the file, add a comment that says "this file
is intentionally empty because I made it so", then chattr +i the
file.  That should prevent udev from registering interfaces in it for
future boots.  It also has the advantage (over "delete during shutdown")
that it'll still achieve your goal even if the system isn't shut down
normally (e.g. power loss, or major kernel crash).

Or, hell, for all I know, there may be some configuration knob in udev
that says "never register my interface names in a file", and you can
just find and turn that knob.

Reply via email to