-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}
-./configure
-make -j ${MAKEJOBS}
-make LIBDIR=/usr/lib INCDIR=/usr/include install
-
-# 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;
-}
-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
-
-# Is it really necessary? If necessary, uncomment entries.
-cat > /etc/dhclient-exit-hooks << "EOF"
-#!/bin/sh
-
-# Load global network parameters
-. /etc/sysconfig/network/network-parameters
-
-# Update /etc/hosts only if we have an ip address.
-if [ -n "${new_ip_address}" ]; then
- #echo "127.0.0.1 localhost.localdomain localhost" > /etc/hosts
- #echo "${new_ip_address} ${DEFAULT_HOSTNAME}" >> /etc/hosts
- exit_status=0
-else
- exit_status=1
-fi
-EOF
-chmod 740 /etc/dhclient-exit-hooks
-
-# The following commands will 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
-
-install -v -m740 ${SCRDIR}/bootscripts/dhcp /etc/rc.d/init.d
-bootscript_add_rc3 dhcp 20 73
-
-exit $?