#!/bin/bash hvconfig_pre() { cd ${LFS_TMP}/${PACKAGE} sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%' server/Makefile.in CONFIGURE_OPTS+=" \ --localstatedir=/var \ --sbindir=/sbin \ --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \ --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \ --with-cli-lease-file=/var/state/dhclient.leases \ --with-cli6-lease-file=/var/state/dhclient6.leases" } hvconfig_post() { sed -i 's/-Werror//' {client,common,dst,omapip,relay,server,tests}/Makefile } hvbuild_post() { # Create a base configuration file for a DHCP server. cat > /etc/dhcpd.conf << EOF # Configuration file for DHCP server. default-lease-time 72000; max-lease-time 144000; ddns-update-style ad-hoc; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.2 192.168.0.240; option broadcast-address 192.168.0.255; option routers 192.168.0.1; option domain-name-servers 192.168.0.1; } EOF mkdir -pv /var/state/dhcp # The lease file must exist on startup. The following command will satisfy # that requirement: touch /var/state/dhcp/dhcpd.leases install -v -m740 ${SCRDIR}/bootscripts/dhcp /etc/rc.d/init.d bootscript_add_rc3 dhcp 20 73 }