aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-12 15:01:59 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-12 15:01:59 -0500
commit7215575834db88849e6ba78de8d179b4a80bdeb6 (patch)
treecf533d59cd9049b7ca5423a427ffa22663931d79
parentdca0c604b4a51fc14f4469e2976937480970cc89 (diff)
Add to network script and source network script during build.
-rw-r--r--chapter9/network.sh25
-rw-r--r--insidechroot.sh15
2 files changed, 33 insertions, 7 deletions
diff --git a/chapter9/network.sh b/chapter9/network.sh
index 6eeead9..e1386a4 100644
--- a/chapter9/network.sh
+++ b/chapter9/network.sh
@@ -11,3 +11,28 @@ PREFIX=24
BROADCAST=192.168.1.255
EOF
popd >/dev/null || exit 1
+
+cat > /etc/resolv.conf << "EOF"
+# Begin /etc/resolv.conf
+
+nameserver 192.168.1.10
+domain berzerkula.org
+search berzerkula.org
+
+# End /etc/resolv.conf
+EOF
+
+echo "lfs" > /etc/hostname
+
+cat > /etc/hosts << "EOF"
+# Begin /etc/hosts
+
+127.0.0.1 localhost.localdomain localhost
+127.0.1.1 lfs.berzerkula.org lfs
+192.168.1.196 lfs.berzerkula.org lfs
+::1 localhost ip6-localhost ip6-loopback
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+
+# End /etc/hosts
+EOF
diff --git a/insidechroot.sh b/insidechroot.sh
index 0e0e621..197658c 100644
--- a/insidechroot.sh
+++ b/insidechroot.sh
@@ -45,13 +45,14 @@ elif [[ "${CHAPTER}" -eq 9 ]]; then
printf "%b" "\n${IWHT}============ ${IGRN}Building ${IYLW}Chapter 9${IWHT} \
============${RST}\n"
- for package in lfs-bootscripts network; do
- source packageinstall.sh network 9 $package
- retval=$?
- if [[ "${retval}" -ne 0 ]]; then
- exit 1
- fi
- done
+ source packageinstall.sh 9 lfs-bootscripts
+ retval=$?
+ if [[ "${retval}" -ne 0 ]]; then
+ exit 1
+ fi
+
+ printf "%b" "${GRN}Configuring network related files${RST}\n"
+ source chapter9/network.sh
else
printf "%b" "Do Chapter 10 stuff here.\n"