From 215feb45ed5a9c0ebc1863aba05cdcce30501375 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Tue, 20 Apr 2021 10:27:12 -0500 Subject: Adjust for systemd specific builds. --- chapter9/network.sh | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'chapter9/network.sh') diff --git a/chapter9/network.sh b/chapter9/network.sh index 4b778cf..d75c5b8 100644 --- a/chapter9/network.sh +++ b/chapter9/network.sh @@ -1,27 +1,20 @@ #!/bin/bash set -e -pushd /etc/sysconfig/ >/dev/null || exit 1 -cat > ifconfig.eth0 << "EOF" -ONBOOT=yes -IFACE=eth0 -SERVICE=ipv4-static -IP=192.168.1.196 -GATEWAY=192.168.1.1 -PREFIX=24 -BROADCAST=192.168.1.255 -EOF -popd >/dev/null || exit 1 - -cat > /etc/resolv.conf << "EOF" -# Begin /etc/resolv.conf +pushd /etc/systemd/network >/dev/null || exit 1 +cat > 10-eth-dhcp.network << "EOF" +[Match] +Name=eth0 -nameserver 192.168.1.10 -domain berzerkula.org -search berzerkula.org +[Network] +DHCP=ipv4 -# End /etc/resolv.conf +[DHCP] +UseDomains=true EOF +popd >/dev/null || exit 1 + +ln -sfv /run/systemd/resolve/resolv.conf /etc/resolv.conf echo "lfs" > /etc/hostname -- cgit v1.2.3-54-g00ecf