summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-10-22 15:52:51 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-10-22 15:52:51 +0200
commitb0146034bbc6416ab83ed5f935eec2f52a7eb9e0 (patch)
treebc293624f5dc14d177e115ad513c78f8e3f82524 /build.sh
parente6cb84430329e74d525a54744a99f1a3e9eff48c (diff)
downloadOpenBSD-firewall-b0146034bbc6416ab83ed5f935eec2f52a7eb9e0.tar.gz
OpenBSD-firewall-b0146034bbc6416ab83ed5f935eec2f52a7eb9e0.tar.bz2
copy dhcpleased/dhclient binaries if necessary
removed -c parameter from vnconfig
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh9
1 files 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