Upgrade to vte-0.38.2
[hvlinux.git] / stage2 / pkg / dhcp
index 391e31f..0c78176 100644 (file)
@@ -1,35 +1,29 @@
 #!/bin/bash
 
-hvbuild_post()
+hvconfig_pre()
 {
-    # This is for the DHCP client
-    cat > /etc/dhclient.conf << "EOF"
-# dhclient.conf
-
-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;
+    sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%' \
+        ${SRC_DIR}/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"
 }
-EOF
-
-    sed -i -e "s!_DOMAIN_!${DOMAIN}!g" /etc/dhclient.conf
 
-    cat > /etc/sysconfig/network/dhcp-client << "EOF"
-# dhcp-client
-# DHCP client program informations
-#
-DHCP_PROG="/sbin/dhclient"
-DHCP_START="-q -1"
-DHCP_STOP="-q -r"
-EOF
+hvconfig_post()
+{
+    sed -i 's/-Werror//' \
+        ${BUILD_DIR}/{client,common,dst,omapip,relay,server,tests}/Makefile
+}
 
+hvbuild_post()
+{
     # 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;
@@ -44,9 +38,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