On 3/9/19 12:57 PM, DJ Lucas via lfs-dev wrote:
On 3/9/2019 10:38 AM, Pierre Labastie via lfs-dev wrote:
On 09/03/2019 17:09, DJ Lucas via lfs-dev wrote:
This reminds me, I'm getting /etc/sysconfig/ifconfig.eth0 with
IFACE=enp3s0.
Yes, completely forgot about that... Problem is, I want to take my
information
from the book, and the book hardcodes ifconfig.eth0. Maybe make "eth0"
replaceable, so that lfs.xsl can catch it more easily... Would it be
acceptable (would render eth0 in italics)? Note that lfs.xsl detects
eth0 in
"IFACE=eth0", because it is in a <literal> tag. That's less easy
outside any
specific tag (I don't consider <userinput> as specific in this book ;)
Yep, that should probably be done anyway, you can still use the value
and just do a quick append, something to the effect of:
(source /etc/sysconfig/ifconfig.eth0 &&
mv /etc/sysconfig/ifconfig.{eth0,${IFACE}})
There are a couple of issues here. There three places in sysV that use
the network interface name:
1. /etc/udev/rules.d/70-persistent-net.rules
This is created by the /lib/udev/init-net-rules.sh script. By default
it will pick up the host system device name. If the host is a distro
like Debian or other systemd based system, the name will probably be
something like enp3s0. On a LFS host that uses eth0, then it will
remain eth0. That said, it can easily be changed to anything you want
with an editor. It sets the interface name in /sys/class/net/ at boot time.
2. /etc/sysconfig/ifconfig.eth0
This is hard coded into 7.5.1. Creating Network Interface Configuration
Files, but is an example. There is no 'here' document to copy/paste.
The file name extention is not 100% required. The startup scripts only
look for the ifconfig stem of the filename. For instance, on my laptop
I have multiple ifconfig files like ifconfig.eth0.home and
ifconfig.eth0.school and I have ONBOOT=no in both. For this system, I
bring up the network manually with, for example, ifup eth0.school.
3. The line IFACE=eth0 in the /etc/sysconfig/ifconfig
This needs to match the device in /sys/class/net/. Typically it would
match the device in the 70-persistent-net.rules file, but the the rules
file is not strictly required.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page