aboutsummaryrefslogtreecommitdiffstats
path: root/chapter9
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-20 10:27:12 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-20 10:27:12 -0500
commitbb184e13b4806c56e095a1a33c4fc3ea281bdd29 (patch)
tree35768bdb2283e474004376603b4cab44be2ceeba /chapter9
parent057e88552151997d0ffb6f0fd306f5c9830a596e (diff)
Adjust for systemd specific builds.
Diffstat (limited to 'chapter9')
-rw-r--r--chapter9/bashprofile.sh10
-rw-r--r--chapter9/bootscriptconf.sh51
-rw-r--r--chapter9/lfs-bootscripts.sh4
-rw-r--r--chapter9/network.sh29
4 files changed, 11 insertions, 83 deletions
diff --git a/chapter9/bashprofile.sh b/chapter9/bashprofile.sh
deleted file mode 100644
index 7ae73c2..0000000
--- a/chapter9/bashprofile.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-cat > /etc/profile << "EOF"
-# Begin /etc/profile
-
-export LANG=en_US
-export LC_TIME=POSIX
-
-# End /etc/profile
-EOF
diff --git a/chapter9/bootscriptconf.sh b/chapter9/bootscriptconf.sh
deleted file mode 100644
index ae9633c..0000000
--- a/chapter9/bootscriptconf.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-cat > /etc/inittab << "EOF"
-# Begin /etc/inittab
-
-id:3:initdefault:
-
-si::sysinit:/etc/rc.d/init.d/rc S
-
-l0:0:wait:/etc/rc.d/init.d/rc 0
-l1:S1:wait:/etc/rc.d/init.d/rc 1
-l2:2:wait:/etc/rc.d/init.d/rc 2
-l3:3:wait:/etc/rc.d/init.d/rc 3
-l4:4:wait:/etc/rc.d/init.d/rc 4
-l5:5:wait:/etc/rc.d/init.d/rc 5
-l6:6:wait:/etc/rc.d/init.d/rc 6
-
-ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
-
-su:S016:once:/sbin/sulogin
-
-1:2345:respawn:/sbin/agetty --noclear tty1 9600
-2:2345:respawn:/sbin/agetty tty2 9600
-3:2345:respawn:/sbin/agetty tty3 9600
-4:2345:respawn:/sbin/agetty tty4 9600
-5:2345:respawn:/sbin/agetty tty5 9600
-6:2345:respawn:/sbin/agetty tty6 9600
-
-# End /etc/inittab
-EOF
-
-cat > /etc/sysconfig/clock << "EOF"
-# Begin /etc/sysconfig/clock
-
-UTC=1
-
-# Set this to any options you might need to give to hwclock,
-# such as machine hardware clock type for Alphas.
-CLOCKPARAMS=
-
-# End /etc/sysconfig/clock
-EOF
-
-#cat > /etc/sysconfig/console << "EOF"
-# Begin /etc/sysconfig/console
-
-#KEYMAP="pl2"
-#FONT="lat2a-16 -m 8859-2"
-
-# End /etc/sysconfig/console
-#EOF
diff --git a/chapter9/lfs-bootscripts.sh b/chapter9/lfs-bootscripts.sh
deleted file mode 100644
index c019094..0000000
--- a/chapter9/lfs-bootscripts.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-set -e
-
-make -j1 install
diff --git a/chapter9/network.sh b/chapter9/network.sh
index 05ab2fd..e82e29e 100644
--- a/chapter9/network.sh
+++ b/chapter9/network.sh
@@ -1,26 +1,19 @@
#!/bin/bash
-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