From b0146034bbc6416ab83ed5f935eec2f52a7eb9e0 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 22 Oct 2022 15:52:51 +0200 Subject: copy dhcpleased/dhclient binaries if necessary removed -c parameter from vnconfig --- build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index bc3be5d..36ab6ee 100755 --- a/build.sh +++ b/build.sh @@ -50,7 +50,7 @@ echo "Using image $IMAGE_FILE as virtual device $DEVICE with $nof_sectors a $BYT dd if=/dev/zero of=$IMAGE_FILE bs=$BYTES_PER_SECTOR count=$nof_sectors -vnconfig -c $DEVICE $IMAGE_FILE +vnconfig $DEVICE $IMAGE_FILE vnconfig -l echo "Installing MBR and creating PC partition table." @@ -153,7 +153,6 @@ cp -R /bin/tar $MOUNTPOINT/bin/. cp -R /bin/test $MOUNTPOINT/bin/. cp -R /sbin/chown $MOUNTPOINT/sbin/. -cp -R /sbin/dhclient $MOUNTPOINT/sbin/. cp -R /sbin/dmesg $MOUNTPOINT/sbin/. cp -R /sbin/fsck $MOUNTPOINT/sbin/. cp -R /sbin/fsck_ffs $MOUNTPOINT/sbin/. @@ -302,10 +301,16 @@ m4 -DHOSTNAME=$HOSTNAME template/etc/rc > $MOUNTPOINT/etc/rc echo "Installing optional specific configuration for $HOSTNAME." +# when running a DHCP client for an uplink if test -f config/$HOSTNAME/dhclient.conf; then cp -R config/$HOSTNAME/dhclient.conf $MOUNTPOINT/etc/. cp -R /sbin/dhclient $MOUNTPOINT/sbin/. fi +if test -f config/$HOSTNAME/dhcpleased.conf; then + cp -R config/$HOSTNAME/dhcpleased.conf $MOUNTPOINT/etc/. + cp -R /sbin/dhcpleased $MOUNTPOINT/sbin/. + cp -R /usr/sbin/dhcpleasectl $MOUNTPOINT/sbin/. +fi # when running a DHCP server for the local network if test -f config/$HOSTNAME/dhcpd.conf; then -- cgit v1.2.3-54-g00ecf