summaryrefslogtreecommitdiff
path: root/build-chroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-chroot.sh')
-rwxr-xr-xbuild-chroot.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/build-chroot.sh b/build-chroot.sh
index 1a8a76f..056d8fd 100755
--- a/build-chroot.sh
+++ b/build-chroot.sh
@@ -612,6 +612,31 @@ make -j $THREADS
make -j $THREADS install
cd ..
+# dhcpcd Build
+tar xf ../sources/dhcpcd-*.tar*
+cd dhcpcd-*/
+./configure \
+ --bindir=/bin \
+ --libdir=/lib \
+ --libexecdir=/lib \
+ --prefix=/usr \
+ --sbindir=/sbin \
+ --sysconfdir=/etc
+make -j $THREADS
+make -j $THREADS install
+# NOTE: dhcpcd doesn't come with OpenRC support, so we need to add the entry
+# under /etc/init.d. First time actually writing an OpenRC service, so
+# expect strangeness to occur. ~ahill
+echo "#!/sbin/openrc-run" > /etc/init.d/dhcpcd
+echo "description=\"DHCP Client Daemon\"" >> /etc/init.d/dhcpcd
+echo "command=\"/sbin/dhcpcd\"" >> /etc/init.d/dhcpcd
+echo "command_args=\"-M\"" >> /etc/init.d/dhcpcd
+echo "command_args_background=\"-b\"" >> /etc/init.d/dhcpcd
+echo "pidfile=\"/run/dhcpcd.pid\"" >> /etc/init.d/dhcpcd
+chmod +x /etc/init.d/dhcpcd
+rc-update add dhcpcd default
+cd ..
+
# Basic Configuration
echo "root::0:0::/home/root:/bin/zsh" > /etc/passwd
echo "root:x:0:root" > /etc/group