summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-03-20 12:42:35 +0000
committerRoy Marples <uberlord@gentoo.org>2006-03-20 12:42:35 +0000
commit52e190cebd7b30f27e002008d1907c621791c0ec (patch)
tree9628a9474c9027d37b657676604dc188b83dd5a6 /net-misc/dhcp
parentStable for x86. (diff)
downloadhistorical-52e190cebd7b30f27e002008d1907c621791c0ec.tar.gz
historical-52e190cebd7b30f27e002008d1907c621791c0ec.tar.bz2
historical-52e190cebd7b30f27e002008d1907c621791c0ec.zip
dhclient-script now supports resolvconf, creates ntp.conf files and uses the env variable IF_METRIC to set a metric on default routes.
Package-Manager: portage-2.1_pre6-r4
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r--net-misc/dhcp/ChangeLog13
-rw-r--r--net-misc/dhcp/Manifest36
-rw-r--r--net-misc/dhcp/dhcp-3.0.3-r6.ebuild187
-rw-r--r--net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild187
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch156
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch168
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch265
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.3-r63
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.4_beta3-r13
9 files changed, 1006 insertions, 12 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index 31057eb24938..8b2bebd24246 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for net-misc/dhcp
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.82 2006/02/28 10:38:58 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.83 2006/03/20 12:42:35 uberlord Exp $
+
+*dhcp-3.0.4_beta3-r1 (20 Mar 2006)
+*dhcp-3.0.3-r6 (20 Mar 2006)
+
+ 20 Mar 2006; Roy Marples <uberlord@gentoo.org>
+ +files/dhcp-3.0.3-dhclient-metric.patch,
+ files/dhcp-3.0.3-dhclient-ntp.patch,
+ +files/dhcp-3.0.3-dhclient-resolvconf.patch, +dhcp-3.0.3-r6.ebuild,
+ +dhcp-3.0.4_beta3-r1.ebuild:
+ dhclient-script now supports resolvconf, creates ntp.conf files and uses the
+ env variable IF_METRIC to set a metric on default routes.
*dhcp-3.0.4_beta3 (28 Feb 2006)
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index d89fa77cc8c8..8b4c26268646 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,18 +1,24 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 e613857aebbfc4c5ac948ce388e17f73 ChangeLog 14126
-RMD160 672420d158eeb260285fa7b5ca3101bb64c64d47 ChangeLog 14126
-SHA256 ef47c0109ac48215ee16acaa95d770ec5f8cad2bede2ec5edb67c5e2d4661419 ChangeLog 14126
+MD5 6995a8889df77e61e8f940037bce037b ChangeLog 14563
+RMD160 f81982694e94a0189e704493948b2ba6f18c187d ChangeLog 14563
+SHA256 7a889d181cda446db966647ce9c3b9e3cdc941765125ba8b97f90593516b3803 ChangeLog 14563
MD5 b268712b328548de32d5db06619787a8 dhcp-3.0.3-r4.ebuild 4062
RMD160 310de76cfa0feff02e9620ed113e5c2647b3b8c8 dhcp-3.0.3-r4.ebuild 4062
SHA256 a2083988469dbf8795387c94da9cff44b8f2dadf89048b32f261954dae3a434a dhcp-3.0.3-r4.ebuild 4062
MD5 a636816328bd3b3d363be0279b8a9123 dhcp-3.0.3-r5.ebuild 5461
RMD160 d834042f13162284ff8397716109d96b51e2f709 dhcp-3.0.3-r5.ebuild 5461
SHA256 045263ee38b27b1dd7f835c94fa166fb583460dd9e954bd702310478af9bb2ce dhcp-3.0.3-r5.ebuild 5461
+MD5 8799e0d479a3127605304b99912da028 dhcp-3.0.3-r6.ebuild 5675
+RMD160 f54b9a6305f6b566790d792e58f601d1893f7a1e dhcp-3.0.3-r6.ebuild 5675
+SHA256 67b77ca5cdadf1b2291af64da672dd5e29c6d16f97f6b91e1d01e052fc63a55d dhcp-3.0.3-r6.ebuild 5675
MD5 a9881c34e537dbc0fed65d8ec6b9d391 dhcp-3.0.4_beta2-r2.ebuild 5393
RMD160 13075851c8279a988c58a8e5d152bd54f6a71512 dhcp-3.0.4_beta2-r2.ebuild 5393
SHA256 f6209e4dba50bfdb75ae64509b7e8678e351a939fe5f4a5330f183fb4b5a0eeb dhcp-3.0.4_beta2-r2.ebuild 5393
+MD5 6f42e349884f29b20a11aa2eed68c5ce dhcp-3.0.4_beta3-r1.ebuild 5687
+RMD160 4e4aba6a6d3ba88660e7135dcd103189998b6116 dhcp-3.0.4_beta3-r1.ebuild 5687
+SHA256 badcee0d688ce9db44c5edf6273b6835bf2f73f1064cd32f837cb2dbe0ad6058 dhcp-3.0.4_beta3-r1.ebuild 5687
MD5 df9e11231ca1c6198aef1be7876e9efe dhcp-3.0.4_beta3.ebuild 5646
RMD160 0b7715952ece799ec5a90bd09f1f5c5904c71d32 dhcp-3.0.4_beta3.ebuild 5646
SHA256 025ed862671bb45582818d69ec602f89d2362ec7f3021ca03f7c1ddb1235b44d dhcp-3.0.4_beta3.ebuild 5646
@@ -25,9 +31,15 @@ SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae files/dh
MD5 d0f61288e81ce020573f3f6965af8489 files/dhcp-3.0.2-gmake.patch 1872
RMD160 d2d41c0a7e002103d68605d2492bfe716bb2889e files/dhcp-3.0.2-gmake.patch 1872
SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215 files/dhcp-3.0.2-gmake.patch 1872
-MD5 2421c68dfdeec65048f1a97cbee1f4ca files/dhcp-3.0.3-dhclient-ntp.patch 168
-RMD160 d08d457d15c33e88922babfe27398f5608791cf6 files/dhcp-3.0.3-dhclient-ntp.patch 168
-SHA256 3baa7b39bdc3e0a8bf49c7090419c54fe3b373a88bb07f6225f46acac8d41bd2 files/dhcp-3.0.3-dhclient-ntp.patch 168
+MD5 b84c373c502e00beaf0882d4a4914915 files/dhcp-3.0.3-dhclient-metric.patch 6172
+RMD160 c0ace5ebee7bf2e7ef187724ab8d91afacd37f39 files/dhcp-3.0.3-dhclient-metric.patch 6172
+SHA256 96e65f4826aa24ee760778d8f2dc5bd5ecfe44b8a6904e11b8f4eda03a8daaaf files/dhcp-3.0.3-dhclient-metric.patch 6172
+MD5 0c9596d1fbd7ce8c71d4dc76f0553f6c files/dhcp-3.0.3-dhclient-ntp.patch 5340
+RMD160 7f72e52af2a6e9d646655020e512133af1e13bf0 files/dhcp-3.0.3-dhclient-ntp.patch 5340
+SHA256 768fb750df7c888194231a3090b0c1929cbd51490d3e9ff5515e0a0cbb776f55 files/dhcp-3.0.3-dhclient-ntp.patch 5340
+MD5 35c34c7946c8eca701915a86feeddebd files/dhcp-3.0.3-dhclient-resolvconf.patch 8361
+RMD160 321320e6d77dc97e956130d6b5d9913c4e88aa7d files/dhcp-3.0.3-dhclient-resolvconf.patch 8361
+SHA256 67104e03ed36aaca671b33410e5b157476b2bad74bc2dd98388e26685e45ab83 files/dhcp-3.0.3-dhclient-resolvconf.patch 8361
MD5 d81606fd8cdd2376018c6466fe9cf0ef files/dhcp-3.0.3-dhclient-stdin-conf.patch 1948
RMD160 42f32a5bbfe2a937827c2972ef84cfa78c2c401c files/dhcp-3.0.3-dhclient-stdin-conf.patch 1948
SHA256 e1bfd26b7da10acc4bd718e35aae4235308abcacde78dedf39533b11ab18b3ae files/dhcp-3.0.3-dhclient-stdin-conf.patch 1948
@@ -67,19 +79,25 @@ SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/di
MD5 414325430622f5011079cd7fd5517485 files/digest-dhcp-3.0.3-r5 232
RMD160 a8cec86f840528ab049182c2d0f0768d7eaa03dc files/digest-dhcp-3.0.3-r5 232
SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/digest-dhcp-3.0.3-r5 232
+MD5 414325430622f5011079cd7fd5517485 files/digest-dhcp-3.0.3-r6 232
+RMD160 a8cec86f840528ab049182c2d0f0768d7eaa03dc files/digest-dhcp-3.0.3-r6 232
+SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/digest-dhcp-3.0.3-r6 232
MD5 f57c85892cf988656b213b419bf69c55 files/digest-dhcp-3.0.4_beta2-r2 238
RMD160 962392441afe513bad3b200d84203d46b14b8be5 files/digest-dhcp-3.0.4_beta2-r2 238
SHA256 6c5131c539857b1b0105c0b878f70fffe0c4553d484f47cb12b95b5c316c952a files/digest-dhcp-3.0.4_beta2-r2 238
MD5 b83cbac7552369e722a4c59768363c0d files/digest-dhcp-3.0.4_beta3 238
RMD160 921c4ec44dad932cdb35ac3659b42581a551fcfd files/digest-dhcp-3.0.4_beta3 238
SHA256 8cf36e2e9d5c1d147a8635fd156ba84d5ce0d4bad70f85e73b9aafee89c71382 files/digest-dhcp-3.0.4_beta3 238
+MD5 b83cbac7552369e722a4c59768363c0d files/digest-dhcp-3.0.4_beta3-r1 238
+RMD160 921c4ec44dad932cdb35ac3659b42581a551fcfd files/digest-dhcp-3.0.4_beta3-r1 238
+SHA256 8cf36e2e9d5c1d147a8635fd156ba84d5ce0d4bad70f85e73b9aafee89c71382 files/digest-dhcp-3.0.4_beta3-r1 238
MD5 436163172942ee1a0bcfb47534a71cce metadata.xml 330
RMD160 216100112bb6a0ffcd8f7779fb876e4a726913fe metadata.xml 330
SHA256 456ab9c26235fa4c1eda6b53b163e901869d5f64ba442b30db1fe86c57fe56af metadata.xml 330
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
-iD8DBQFEEV50EbVyYKaZ/NERAl4NAJ9Zpupb51xxnz/XSu4CptXFE32rAgCfQ8fz
-xXBHd3t0Ux+QOg0HTSQTIE0=
-=r6hP
+iD8DBQFEHqNLEbVyYKaZ/NERArYDAJ9GmtzNIVL9R/DbU588x3L6XMBOMwCbBbgu
+xPrLV76KQSsSv0onMU++yIk=
+=1Joc
-----END PGP SIGNATURE-----
diff --git a/net-misc/dhcp/dhcp-3.0.3-r6.ebuild b/net-misc/dhcp/dhcp-3.0.3-r6.ebuild
new file mode 100644
index 000000000000..3f7b5330a8a1
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.3-r6.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.3-r6.ebuild,v 1.1 2006/03/20 12:42:35 uberlord Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV="${PV//_beta/b}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dhcp )
+ sys-apps/net-tools"
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ >=sys-apps/sed-4"
+
+PROVIDE="virtual/dhcpc"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Gentoo patches - these will probably never be accepted upstream
+ # Enable chroot support
+ epatch "${FILESDIR}/${PN}-3.0-paranoia.patch"
+ # Fix some permission issues
+ epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch"
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-ntp.patch"
+ # Allow dhclient to use IF_METRIC to set route metrics
+ # Also, stop doing ifconfig down on Linux as that kills wpa_supplicant
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch"
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
+ # Quiet the isc blurb
+ epatch "${FILESDIR}/${PN}-3.0.3-no_isc_blurb.patch"
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-stdin-conf.patch"
+
+ # General fixes which will probably be accepted upstream eventually
+ # Install libdst, #75544
+ epatch "${FILESDIR}/${PN}-3.0.3-libdst.patch"
+ # Fix building on Gentoo/FreeBSD
+ epatch "${FILESDIR}/${PN}-3.0.2-gmake.patch"
+
+ # Brand the version with Gentoo
+ # include revision if >0
+ local newver="${MY_PV}-Gentoo"
+ [[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
+ sed -i -e '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
+ includes/version.h
+
+ # Change the hook script locations of the scripts
+ sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ client/scripts/*
+
+ # Remove these options from the sample config
+ sed -i -e "/\(script\|host-name\|domain-name\) / d" client/dhclient.conf
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+
+ # Now remove the non-english docs so there are no errors later
+ [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
+}
+
+src_compile() {
+ # 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org>
+ [[ ${ARCH} == "sparc" ]] && filter-flags -O3 -O2 -O
+
+ use static && append-ldflags -static
+
+ cat <<-END >> includes/site.h
+ #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
+ #define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
+ #define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
+ #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
+ #define DHCPD_LOG_FACILITY LOG_LOCAL1
+ END
+
+ cat <<-END > site.conf
+ CC = $(tc-getCC)
+ LFLAGS = ${LDFLAGS}
+ LIBDIR = /usr/$(get_libdir)
+ INCDIR = /usr/include
+ ETC = /etc/dhcp
+ VARDB = /var/lib/dhcp
+ VARRUN = /var/run/dhcp
+ ADMMANDIR = /usr/share/man/man8
+ FFMANDIR = /usr/share/man/man5
+ LIBMANDIR = /usr/share/man/man3
+ USRMANDIR = /usr/share/man/man1
+ END
+
+ ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
+ || die "configure failed"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+
+ insinto /etc/dhcp
+ newins server/dhcpd.conf dhcpd.conf.sample
+ newins client/dhclient.conf dhclient.conf.sample
+
+ dodoc README RELNOTES doc/*
+ newdoc client/dhclient.conf dhclient.conf.sample
+ newdoc client/scripts/linux dhclient-script.sample
+ newdoc server/dhcpd.conf dhcpd.conf.sample
+
+ newinitd "${FILESDIR}/dhcpd.init" dhcpd
+ newinitd "${FILESDIR}/dhcrelay.init" dhcrelay
+ insinto /etc/conf.d
+ newins "${FILESDIR}/dhcpd.conf" dhcpd
+ newins "${FILESDIR}/dhcrelay.conf" dhcrelay
+
+ keepdir /var/{lib,run}/dhcp
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+}
+
+pkg_postinst() {
+ chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
+
+ if [[ -e "${ROOT}/etc/init.d/dhcp" ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+
+ einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
+ einfo
+ einfo "If you would like to run dhcpd in a chroot, simply configure the"
+ einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
+ einfo " emerge --config =${PF}"
+}
+
+pkg_config() {
+ local CHROOT="$(
+ sed -n 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
+ /etc/conf.d/dhcpd
+ )"
+
+ if [[ -z ${CHROOT} ]]; then
+ eerror "CHROOT not defined in /etc/conf.d/dhcpd"
+ return 1
+ fi
+
+ if [[ -d ${CHROOT} ]] ; then
+ ewarn "${CHROOT} already exists - aborting"
+ return 0
+ fi
+
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
+ cp /etc/{localtime,resolv.conf} "${CHROOT}/etc"
+ cp -R /etc/dhcp "${CHROOT}/etc/"
+ cp -R /var/lib/dhcp "${CHROOT}/var/lib"
+ chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
+ eend
+
+ local logger="$(best_version virtual/logger)"
+ einfo "To enable logging from the dhcpd server, configure your"
+ einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
+}
diff --git a/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild b/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild
new file mode 100644
index 000000000000..fa2aa800fe83
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild,v 1.1 2006/03/20 12:42:35 uberlord Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV="${PV//_beta/b}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dhcp )
+ sys-apps/net-tools"
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ >=sys-apps/sed-4"
+
+PROVIDE="virtual/dhcpc"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Gentoo patches - these will probably never be accepted upstream
+ # Enable chroot support
+ epatch "${FILESDIR}/${PN}-3.0-paranoia.patch"
+ # Fix some permission issues
+ epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch"
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-ntp.patch"
+ # Allow dhclient to use IF_METRIC to set route metrics
+ # Also, stop doing ifconfig down on Linux as that kills wpa_supplicant
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch"
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
+ # Quiet the isc blurb
+ epatch "${FILESDIR}/${PN}-3.0.3-no_isc_blurb.patch"
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}/${PN}-3.0.4_beta2-dhclient-stdin-conf.patch"
+
+ # General fixes which will probably be accepted upstream eventually
+ # Install libdst, #75544
+ epatch "${FILESDIR}/${PN}-3.0.3-libdst.patch"
+ # Fix building on Gentoo/FreeBSD
+ epatch "${FILESDIR}/${PN}-3.0.2-gmake.patch"
+
+ # Brand the version with Gentoo
+ # include revision if >0
+ local newver="${MY_PV}-Gentoo"
+ [[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
+ sed -i -e '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
+ includes/version.h
+
+ # Change the hook script locations of the scripts
+ sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ client/scripts/*
+
+ # Remove these options from the sample config
+ sed -i -e "/\(script\|host-name\|domain-name\) / d" client/dhclient.conf
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+
+ # Now remove the non-english docs so there are no errors later
+ [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
+}
+
+src_compile() {
+ # 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org>
+ [[ ${ARCH} == "sparc" ]] && filter-flags -O3 -O2 -O
+
+ use static && append-ldflags -static
+
+ cat <<-END >> includes/site.h
+ #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
+ #define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
+ #define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
+ #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
+ #define DHCPD_LOG_FACILITY LOG_LOCAL1
+ END
+
+ cat <<-END > site.conf
+ CC = $(tc-getCC)
+ LFLAGS = ${LDFLAGS}
+ LIBDIR = /usr/$(get_libdir)
+ INCDIR = /usr/include
+ ETC = /etc/dhcp
+ VARDB = /var/lib/dhcp
+ VARRUN = /var/run/dhcp
+ ADMMANDIR = /usr/share/man/man8
+ FFMANDIR = /usr/share/man/man5
+ LIBMANDIR = /usr/share/man/man3
+ USRMANDIR = /usr/share/man/man1
+ END
+
+ ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
+ || die "configure failed"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+
+ insinto /etc/dhcp
+ newins server/dhcpd.conf dhcpd.conf.sample
+ newins client/dhclient.conf dhclient.conf.sample
+
+ dodoc README RELNOTES doc/*
+ newdoc client/dhclient.conf dhclient.conf.sample
+ newdoc client/scripts/linux dhclient-script.sample
+ newdoc server/dhcpd.conf dhcpd.conf.sample
+
+ newinitd "${FILESDIR}/dhcpd.init" dhcpd
+ newinitd "${FILESDIR}/dhcrelay.init" dhcrelay
+ insinto /etc/conf.d
+ newins "${FILESDIR}/dhcpd.conf" dhcpd
+ newins "${FILESDIR}/dhcrelay.conf" dhcrelay
+
+ keepdir /var/{lib,run}/dhcp
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+}
+
+pkg_postinst() {
+ chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
+
+ if [[ -e "${ROOT}/etc/init.d/dhcp" ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+
+ einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
+ einfo
+ einfo "If you would like to run dhcpd in a chroot, simply configure the"
+ einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
+ einfo " emerge --config =${PF}"
+}
+
+pkg_config() {
+ local CHROOT="$(
+ sed -n 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
+ /etc/conf.d/dhcpd
+ )"
+
+ if [[ -z ${CHROOT} ]]; then
+ eerror "CHROOT not defined in /etc/conf.d/dhcpd"
+ return 1
+ fi
+
+ if [[ -d ${CHROOT} ]] ; then
+ ewarn "${CHROOT} already exists - aborting"
+ return 0
+ fi
+
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
+ cp /etc/{localtime,resolv.conf} "${CHROOT}/etc"
+ cp -R /etc/dhcp "${CHROOT}/etc/"
+ cp -R /var/lib/dhcp "${CHROOT}/var/lib"
+ chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
+ eend
+
+ local logger="$(best_version virtual/logger)"
+ einfo "To enable logging from the dhcpd server, configure your"
+ einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
+}
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
new file mode 100644
index 000000000000..e16c2306956f
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
@@ -0,0 +1,156 @@
+diff -ru /tmp/client/scripts/bsdos client/scripts/bsdos
+--- /tmp/client/scripts/bsdos 2006-03-18 14:47:59.393686000 +0000
++++ client/scripts/bsdos 2006-03-18 14:59:18.000000000 +0000
+@@ -132,7 +132,7 @@
+ $new_broadcast_arg $medium"
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ if [ "$new_static_routes" != "" ]; then
+ set $new_static_routes
+@@ -198,7 +198,7 @@
+ fi
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ set $new_static_routes
+ while [ $# -gt 1 ]; do
+diff -ru /tmp/client/scripts/freebsd client/scripts/freebsd
+--- /tmp/client/scripts/freebsd 2006-03-18 14:47:59.393686000 +0000
++++ client/scripts/freebsd 2006-03-18 15:00:48.000000000 +0000
+@@ -162,7 +162,7 @@
+ fi
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ if [ -n "$new_static_routes" ]; then
+ $LOGGER "New Static Routes: $new_static_routes"
+@@ -233,7 +233,7 @@
+ fi
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ set -- $new_static_routes
+ while [ $# -gt 1 ]; do
+diff -ru /tmp/client/scripts/linux client/scripts/linux
+--- /tmp/client/scripts/linux 2006-03-18 14:47:59.393686000 +0000
++++ client/scripts/linux 2006-03-18 14:56:43.000000000 +0000
+@@ -140,13 +140,11 @@
+ if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+ [ x$alias_ip_address != x$old_ip_address ]; then
+ # Possible new alias. Remove old alias.
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+- # IP address changed. Bringing down the interface will delete all routes,
+- # and clear the ARP cache.
+- ifconfig $interface inet 0 down
+-
++ # IP address changed - set existing to 0.
++ ifconfig $interface inet 0.0.0.0
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+@@ -159,14 +157,14 @@
+ route add -net $new_network_number $new_subnet_arg dev $interface
+ fi
+ for router in $new_routers; do
+- route add default gw $router
++ route add default gw $router ${IF_METRIC:+metric $IF_METRIC} dev $interface
+ done
+ fi
+ if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+ then
+ ifconfig $interface:0- inet 0
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address $interface:0
++ route add -host $alias_ip_address dev $interface:0
+ fi
+ make_resolv_conf
+ exit_with_hooks 0
+@@ -179,12 +177,12 @@
+ ifconfig $interface:0- inet 0
+ fi
+ if [ x$old_ip_address != x ]; then
+- # Shut down interface, which will delete routes and clear arp cache.
+- ifconfig $interface inet 0 down
++ # Remove old address
++ ifconfig $interface inet 0.0.0.0
+ fi
+ if [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address $interface:0
++ route add -host $alias_ip_address dev $interface:0
+ fi
+ exit_with_hooks 0
+ fi
+@@ -205,15 +203,15 @@
+ fi
+ if [ $relmajor -lt 2 ] || \
+ ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
+- route add -net $new_network_number
++ route add -net $new_network_number dev $interface
+ fi
+ for router in $new_routers; do
+- route add default gw $router
++ route add default gw $router ${IF_METRIC:+metric $IF_METRIC} dev $interface
+ done
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+- ifconfig $interface inet 0 down
++ ifconfig $interface inet 0.0.0.0
+ exit_with_hooks 1
+ fi
+
+diff -ru /tmp/client/scripts/netbsd client/scripts/netbsd
+--- /tmp/client/scripts/netbsd 2006-03-18 14:47:59.393686000 +0000
++++ client/scripts/netbsd 2006-03-18 15:02:29.000000000 +0000
+@@ -132,7 +132,7 @@
+ $new_broadcast_arg $medium"
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ if [ "$new_static_routes" != "" ]; then
+ set $new_static_routes
+@@ -198,7 +198,7 @@
+ fi
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ set $new_static_routes
+ while [ $# -gt 1 ]; do
+diff -ru /tmp/client/scripts/openbsd client/scripts/openbsd
+--- /tmp/client/scripts/openbsd 2006-03-18 14:47:59.393686000 +0000
++++ client/scripts/openbsd 2006-03-18 15:04:24.000000000 +0000
+@@ -132,7 +132,7 @@
+ $new_broadcast_arg $medium"
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ if [ "$new_static_routes" != "" ]; then
+ set $new_static_routes
+@@ -198,7 +198,7 @@
+ fi
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+- route add default $router >/dev/null 2>&1
++ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
+ done
+ set $new_static_routes
+ while [ $# -gt 1 ]; do
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch
index 2c989b7f7a5f..3684904e1e47 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch
@@ -1,5 +1,5 @@
---- isc-dhcp/client/clparse.c
-+++ isc-dhcp/client/clparse.c
+--- client/clparse.c
++++ client/clparse.c
@@ -63,6 +63,7 @@
DHO_DOMAIN_NAME,
DHO_DOMAIN_NAME_SERVERS,
@@ -7,3 +7,167 @@
+ DHO_NTP_SERVERS,
0
};
+
+--- client/scripts/bsdos
++++ client/scripts/bsdos
+@@ -7,6 +7,24 @@
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ echo -e "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+--- client/scripts/freebsd
++++ client/scripts/freebsd
+@@ -32,8 +32,25 @@
+ done
+ fi
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
+ }
+
++make_ntp_conf() {
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ echo -e "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
++}
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+ exit_with_hooks() {
+ exit_status=$1
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -30,6 +30,24 @@
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ echo -e "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+--- client/scripts/netbsd
++++ client/scripts/netbsd
+@@ -7,6 +7,24 @@
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ echo -e "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+--- client/scripts/openbsd
++++ client/scripts/openbsd
+@@ -7,6 +7,24 @@
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ echo -e "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+--- client/scripts/solaris
++++ client/scripts/solaris
+@@ -7,6 +7,24 @@
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ echo -e "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
new file mode 100644
index 000000000000..c8825dfa4256
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
@@ -0,0 +1,265 @@
+--- client/scripts/bsdos
++++ client/scripts/bsdos
+@@ -1,11 +1,20 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+- echo search $new_domain_name >/etc/resolv.conf
++ if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ if [ "x$new_domain_name" != x ]; then
++ conf="${conf}search $new_domain_name\n"
++ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf
++ conf="${conf}nameserver $nameserver\n"
+ done
++ if [ -x /sbin/resolvconf ]; then
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ # If we're making confs, may as well make an ntp.conf too
+ make_ntp_conf
+@@ -173,6 +182,7 @@
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+ route add $alias_ip_address 127.0.0.1
+ fi
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 0
+ fi
+
+@@ -218,6 +228,7 @@
+ fi
+ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
+ |sh >/dev/null 2>&1
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 1
+ fi
+
+--- client/scripts/freebsd
++++ client/scripts/freebsd
+@@ -11,25 +11,19 @@
+ fi
+
+ make_resolv_conf() {
+- if [ x"$new_domain_name_servers" != x ]; then
++ if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
+ if [ "x$new_domain_name" != x ]; then
+- ( echo search $new_domain_name >/etc/resolv.conf )
+- exit_status=$?
+- else
+- if [ -e /etc/resolv.conf ] ; then
+- ( rm /etc/resolv.conf )
+- exit_status=$?
+- else
+- ( touch /etc/resolv.conf )
+- exit_status=$?
+- fi
++ conf="${conf}search $new_domain_name\n"
+ fi
+- if [ $exit_status -ne 0 ]; then
+- $LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
++ for nameserver in $new_domain_name_servers; do
++ conf="${conf}nameserver $nameserver\n"
++ done
++ if [ -x /sbin/resolvconf ]; then
++ echo -e "$conf" | resolvconf -a "$interface"
+ else
+- for nameserver in $new_domain_name_servers; do
+- ( echo nameserver $nameserver >>/etc/resolv.conf )
+- done
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
+ fi
+ fi
+ # If we're making confs, may as well make an ntp.conf too
+@@ -204,6 +198,7 @@
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+ route add $alias_ip_address 127.0.0.1
+ fi
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 0
+ fi
+
+@@ -253,6 +248,7 @@
+ fi
+ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
+ |sh >/dev/null 2>&1
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 1
+ fi
+
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -23,12 +23,20 @@
+ # of the $1 in its args.
+
+ make_resolv_conf() {
+- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+- echo search $new_domain_name >/etc/resolv.conf
+- chmod 644 /etc/resolv.conf
++ if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ if [ "x$new_domain_name" != x ]; then
++ conf="${conf}search $new_domain_name\n"
++ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf
++ conf="${conf}nameserver $nameserver\n"
+ done
++ if [ -x /sbin/resolvconf ]; then
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ # If we're making confs, may as well make an ntp.conf too
+ make_ntp_conf
+@@ -180,6 +188,7 @@
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address dev $interface:0
+ fi
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 0
+ fi
+
+@@ -208,6 +217,7 @@
+ exit_with_hooks 0
+ fi
+ ifconfig $interface inet 0.0.0.0
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 1
+ fi
+
+--- client/scripts/netbsd
++++ client/scripts/netbsd
+@@ -1,11 +1,20 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+- echo search $new_domain_name >/etc/resolv.conf
++ if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ if [ "x$new_domain_name" != x ]; then
++ conf="${conf}search $new_domain_name\n"
++ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf
++ conf="${conf}nameserver $nameserver\n"
+ done
++ if [ -x /sbin/resolvconf ]; then
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ # If we're making confs, may as well make an ntp.conf too
+ make_ntp_conf
+@@ -173,6 +182,7 @@
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+ route add $alias_ip_address 127.0.0.1
+ fi
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 0
+ fi
+
+@@ -218,6 +228,7 @@
+ fi
+ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
+ |sh >/dev/null 2>&1
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 1
+ fi
+
+--- client/scripts/openbsd
++++ client/scripts/openbsd
+@@ -1,11 +1,20 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+- echo search $new_domain_name >/etc/resolv.conf
++ if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ if [ "x$new_domain_name" != x ]; then
++ conf="${conf}search $new_domain_name\n"
++ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf
++ conf="${conf}nameserver $nameserver\n"
+ done
++ if [ -x /sbin/resolvconf ]; then
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ # If we're making confs, may as well make an ntp.conf too
+ make_ntp_conf
+@@ -173,6 +182,7 @@
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+ route add $alias_ip_address 127.0.0.1
+ fi
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 0
+ fi
+
+@@ -218,6 +228,7 @@
+ fi
+ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
+ |sh >/dev/null 2>&1
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 1
+ fi
+
+--- client/scripts/solaris
++++ client/scripts/solaris
+@@ -1,11 +1,20 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+- echo search $new_domain_name >/etc/resolv.conf
++ if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ if [ "x$new_domain_name" != x ]; then
++ conf="${conf}search $new_domain_name\n"
++ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf
++ conf="${conf}nameserver $nameserver\n"
+ done
++ if [ -x /sbin/resolvconf ]; then
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ # If we're making confs, may as well make an ntp.conf too
+ make_ntp_conf
+@@ -157,6 +166,7 @@
+ $ifconfig ${interface}:1 inet $alias_ip_address $alias_subnet_arg
+ route add $alias_ip_address 127.0.0.1 1
+ fi
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 0
+ fi
+
+@@ -186,6 +196,7 @@
+ for router in $old_routers; do
+ route delete default $router >/dev/null 2>&1
+ done
++ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
+ exit_with_hooks 1
+ fi
+
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.3-r6 b/net-misc/dhcp/files/digest-dhcp-3.0.3-r6
new file mode 100644
index 000000000000..bfdf4cb56303
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.3-r6
@@ -0,0 +1,3 @@
+MD5 f91416a0b8ed3fd0601688cf0b7df58f dhcp-3.0.3.tar.gz 870240
+RMD160 bcbd1f8b49f17809a3473103a7b5e096c45855d7 dhcp-3.0.3.tar.gz 870240
+SHA256 c96bcd884dde06c22a709cfb9e84f7e32f6577dcd52aa7f12186aa22b5e63afe dhcp-3.0.3.tar.gz 870240
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.4_beta3-r1 b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta3-r1
new file mode 100644
index 000000000000..f896f9d1f882
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta3-r1
@@ -0,0 +1,3 @@
+MD5 560bd40eae9577eeacbdf2751651f4af dhcp-3.0.4b3.tar.gz 881727
+RMD160 2a696a2d83f89731481a94a0e569650ef069651e dhcp-3.0.4b3.tar.gz 881727
+SHA256 2e0b79b6dfbb2b686ccef0d48340865de7e4fea09286b097911639a922d289bc dhcp-3.0.4b3.tar.gz 881727