X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fpkg%2Fdhcp;h=c4be30c40a79a8a1598711ee940b6f70f49c30ac;hb=083296c57af0d21be562eeb4a71db7091ec0a38c;hp=ce13b4b4363e67c73f27cee796a295933e3c901d;hpb=7c8d45899479cd35f78814f6c46c2b8bff45d222;p=hvlinux.git diff --git a/stage2/pkg/dhcp b/stage2/pkg/dhcp index ce13b4b..c4be30c 100644 --- a/stage2/pkg/dhcp +++ b/stage2/pkg/dhcp @@ -2,17 +2,27 @@ hvconfig_pre() { - CONFIGURE_OPTS="" + 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" } -hvbuild() +hvconfig_post() { - ${HVMAKE} - ${HVMAKE} LIBDIR=/usr/lib INCDIR=/usr/include install + sed -i 's/-Werror//' {client,common,dst,omapip,relay,server,tests}/Makefile } hvbuild_post() { + install -m 755 client/scripts/linux /sbin/dhclient-script + # This is for the DHCP client cat > /etc/dhclient.conf << "EOF" # dhclient.conf @@ -21,7 +31,6 @@ timeout 15; interface "eth0"{ supersede domain-name "_DOMAIN_"; - prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; require subnet-mask, domain-name-servers; @@ -40,7 +49,7 @@ DHCP_STOP="-q -r" EOF # Create a base configuration file for a DHCP server. - cat > /etc/dhcpd.conf << EOF + cat > /etc/dhcpd.conf << EOF # Configuration file for DHCP server. default-lease-time 72000; @@ -55,9 +64,11 @@ subnet 192.168.0.0 netmask 255.255.255.0 { } 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 + touch /var/state/dhcp/dhcpd.leases install -v -m740 ${SCRDIR}/bootscripts/dhcp /etc/rc.d/init.d bootscript_add_rc3 dhcp 20 73