On Wednesday 28 August 2019 12:53:15 Greg Wooledge wrote: > 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.
Instant reaction, Greg: Paranoia reigns supreme, so they would never, ever, in a million years, give the user such a knob. I've resorted to the chattr on more than one occasion. Works well if you can get it all done before before the timer runs the N-M script again. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>