From 5a9383dc799ad6e7ede2c1e8397bc0987969239f Mon Sep 17 00:00:00 2001 From: gobo72 Date: Wed, 25 Jan 2012 05:36:19 +0000 Subject: [PATCH] Ajout script manquant dhclient-script --- stage2/hv-install-2 | 2 +- stage2/pkg/dhcp | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/stage2/hv-install-2 b/stage2/hv-install-2 index d9ed780..824ff26 100755 --- a/stage2/hv-install-2 +++ b/stage2/hv-install-2 @@ -41,7 +41,7 @@ FORCE_UNSAFE_CONFIGURE=1 ipkg ${TAR_PACKAGE} "--bindir=/bin --libexecdir=/usr/sb ipkg ${TEXINFO} ipkg ${UDEV} ipkg ${GRUB} -ipkg -m acnb ${DHCP} "--exec-prefix=/" +ipkg -m acnb ${DHCP} if [ -n "${WIFI_SUPPORT}" ]; then PREFIX=/usr ipkg -m noac -s wireless-tools ${WIRELESS_TOOLS} diff --git a/stage2/pkg/dhcp b/stage2/pkg/dhcp index 391e31f..5f640d4 100644 --- a/stage2/pkg/dhcp +++ b/stage2/pkg/dhcp @@ -1,7 +1,29 @@ #!/bin/bash +hvconfig_pre() +{ + cd ${LFS_TMP}/${PACKAGE} + sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%' server/Makefile.in + + CONFIGURE_OPTS="\ + ${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() { + install -m 755 client/scripts/linux /sbin/dhclient-script + # This is for the DHCP client cat > /etc/dhclient.conf << "EOF" # dhclient.conf @@ -29,7 +51,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; @@ -44,9 +66,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 -- 2.20.1