Discussion:
[lfs-support] 70-persistent-net-rules
Paul Rogers
2018-06-18 18:03:10 UTC
Permalink
I've surmounted all the obstacles and finally completed my 8.1 build, and cloned it here for testing. During the cloning the NIC rules weren't created, so I did that by hand. I'd really like to automate that in cloning, but I'd want to specify the name eth0 from the script that calls init-net-rules. The book doesn't say so, but from a cursory look at the code it seems as if ". /lib/udev/init-net-rules INTERFACE_NAME=eth0" (or the inverse) might work. Is that right? (It says it's an LFS script, so someobdy here should know.)
--
Paul Rogers
***@fastmail.fm
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL :-)
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.
Bruce Dubbs
2018-06-18 19:00:32 UTC
Permalink
Post by Paul Rogers
I've surmounted all the obstacles and finally completed my 8.1 build, and cloned it here for testing. During the cloning the NIC rules weren't created, so I did that by hand. I'd really like to automate that in cloning, but I'd want to specify the name eth0 from the script that calls init-net-rules. The book doesn't say so, but from a cursory look at the code it seems as if ". /lib/udev/init-net-rules INTERFACE_NAME=eth0" (or the inverse) might work. Is that right? (It says it's an LFS script, so someobdy here should know.)
Yes, it is an LFS specific script. When cloning, you should:

rm /etc/udev/rules.d/70-persistent-net.rules
bash /lib/udev/init-net-rules.sh

The script bails if the file already exists. Note that is also bails if
the system is in a virtual environment. I would be possible for
instances to change mac addresses in that case.

For the simple case with only one network interface (or even one wired
and one wireless interface), the easiest way to boot is to add
net.ifnames=0 to the kernel command line. Then you don't need
70-persistent-net.rules at all.

Of course you are free to modify init-net-rules.sh any way you like.

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.
Continue reading on narkive:
Loading...