diff options
author | 2014-01-06 21:44:17 +0000 | |
---|---|---|
committer | 2014-01-06 21:44:17 +0000 | |
commit | 35d36b24010e27217c66b1b3f7dee9da695c468c (patch) | |
tree | 1e34bd6a3399124ec3096ccdadeadcdb26ed401b /net-misc/dhcp | |
parent | Marked ~hppa too. (diff) | |
download | gentoo-2-35d36b24010e27217c66b1b3f7dee9da695c468c.tar.gz gentoo-2-35d36b24010e27217c66b1b3f7dee9da695c468c.tar.bz2 gentoo-2-35d36b24010e27217c66b1b3f7dee9da695c468c.zip |
Security cleanup, wrt bug #463848, acked by Tony Vroon
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)
Diffstat (limited to 'net-misc/dhcp')
35 files changed, 23 insertions, 5109 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog index c07a1e1f2a1f..1b469f8f6394 100644 --- a/net-misc/dhcp/ChangeLog +++ b/net-misc/dhcp/ChangeLog @@ -1,6 +1,27 @@ # ChangeLog for net-misc/dhcp -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.247 2013/12/26 12:58:50 pacho Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.248 2014/01/06 21:44:16 pinkbyte Exp $ + + 06 Jan 2014; Sergey Popov <pinkbyte@gentoo.org> + -files/dhcp-3.0.2-gmake.patch, -files/dhcp-3.0.3-dhclient-dbus.patch, + -files/dhcp-3.0.3-dhclient-hostname.patch, + -files/dhcp-3.0.3-dhclient-metric.patch, + -files/dhcp-3.0.3-dhclient-mtu.patch, -files/dhcp-3.0.3-dhclient-ntp.patch, + -files/dhcp-3.0.3-libdst.patch, -files/dhcp-3.0.3-no_isc_blurb.patch, + -files/dhcp-3.0.4-dhclient-stdin-conf.patch, + -files/dhcp-3.0.5-bpf-nofallback.patch, + -files/dhcp-3.1.0a1-dhclient-resolvconf.patch, -dhcp-3.1.2_p1.ebuild, + -files/dhcp-3.1.2_p1-CVE-2009-1892.patch, -dhcp-3.1.3_p1.ebuild, + -files/dhcp-4.0.1-dhclient-stdin-conf.patch, -dhcp-4.2.1_p1.ebuild, + -files/dhcp-4.2.1-dhclient-parse_option_param-Bad-format-a.patch, + -files/dhcp-4.2.1-dhclient-resolvconf.patch, + -files/dhcp-4.2.1-nogateway.patch, -dhcp-4.2.2.ebuild, -dhcp-4.2.2-r1.ebuild, + -dhcp-4.2.2-r2.ebuild, -dhcp-4.2.2-r3.ebuild, -dhcp-4.2.3_p1.ebuild, + -dhcp-4.2.3_p2.ebuild, -dhcp-4.2.4_p1.ebuild, -dhcp-4.2.4_p2.ebuild, + -dhcp-4.2.4_p2-r1.ebuild, -files/dhcpd.conf, -files/dhcpd.init2, + -files/dhcpd.init3, -files/dhcpd.init4, -files/dhcrelay.init, + -files/dhcrelay.init2: + Security cleanup, wrt bug #463848, acked by Tony Vroon *dhcp-4.2.5_p1-r2 (26 Dec 2013) diff --git a/net-misc/dhcp/dhcp-3.1.2_p1.ebuild b/net-misc/dhcp/dhcp-3.1.2_p1.ebuild deleted file mode 100644 index e4dc959bafef..000000000000 --- a/net-misc/dhcp/dhcp-3.1.2_p1.ebuild +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.2_p1.ebuild,v 1.12 2012/12/09 21:16:16 ulm Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/p}" -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 BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" -IUSE="doc minimal static selinux kernel_linux" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools )" - -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 - # resolvconf support in dhclient-script - epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch - # Fix setting hostnames on Linux - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch - # Allow mtu settings - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch - # Allow dhclient to use IF_METRIC to set route metrics - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-metric.patch - # Stop downing the interface on Linux as that breaks link dameons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.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-dhclient-stdin-conf.patch - # Disable fallback interfaces when using BPF - # This allows more than one dhclient instance on the BSD's - epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.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 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch - - # Denial of service through mixed identifier/ethernet host definitions - epatch "${FILESDIR}/${P}"-CVE-2009-1892.patch - - # Brand the version with Gentoo - # include revision if >0 - local newver="${MY_PV}-Gentoo" - [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" - sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \ - includes/version.h || die - - # Change the hook script locations of the scripts - sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash, #158540. - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - # Build sed man pages as we don't ever support BSD 4.4 and older, #130251. - local x= - for x in Makefile.dist $(ls */Makefile.dist) ; do - sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die - done - - # 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() { - 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_CONF "/etc/dhcp/dhclient.conf" - #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases" - #define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid" - #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 - ADMMANEXT = .8 - FFMANDIR = /usr/share/man/man5 - FFMANEXT = .5 - LIBMANDIR = /usr/share/man/man3 - LIBMANEXT = .3 - USRMANDIR = /usr/share/man/man1 - USRMANEXT = .1 - MANCAT = man - END - - ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ - || die "configure failed" - - # Remove server support from the Makefile - # We still install some extra crud though - if use minimal ; then - sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die - fi - emake || die "compile problem" -} - -src_install() { - make install DESTDIR="${D}" || die - use doc && dodoc README RELNOTES doc/* - - insinto /etc/dhcp - newins client/dhclient.conf dhclient.conf.sample - keepdir /var/{lib,run}/dhcp - keepdir /var/lib/dhclient - - # Install our server files - if ! use minimal ; then - insinto /etc/dhcp - newins server/dhcpd.conf dhcpd.conf.sample - newinitd "${FILESDIR}"/dhcpd.init2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init dhcrelay - newconfd "${FILESDIR}"/dhcpd.conf dhcpd - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - - # We never want portage to own this file - rm -f "${D}"/var/lib/dhcp/dhcpd.leases - fi -} - -pkg_preinst() { - if ! use minimal ; then - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - fi -} - -pkg_postinst() { - use minimal && return - - chown -R 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() { - if use minimal ; then - eerror "${PN} has not been compiled for server support" - eerror "emerge ${PN} without the minimal USE flag to use dhcp sever" - return 1 - fi - - local CHROOT="$( - sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ - "${ROOT}"/etc/conf.d/dhcpd - )" - - if [[ -z ${CHROOT} ]]; then - eerror "CHROOT not defined in /etc/conf.d/dhcpd" - return 1 - fi - - CHROOT="${ROOT}/${CHROOT}" - - 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 - ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib - chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp - eend 0 - - 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.1.3_p1.ebuild b/net-misc/dhcp/dhcp-3.1.3_p1.ebuild deleted file mode 100644 index 8587703f323c..000000000000 --- a/net-misc/dhcp/dhcp-3.1.3_p1.ebuild +++ /dev/null @@ -1,246 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.3_p1.ebuild,v 1.12 2012/12/09 21:16:16 ulm Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -#MY_PV="${PV//_alpha/a}" -#MY_PV="${MY_PV//_beta/b}" -#MY_PV="${MY_PV//_rc/rc}" -#MY_PV="${MY_PV//_p/p}" -MY_PV="$(get_version_component_range 1-2 "${PV}" )-ESV" -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 BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -IUSE="doc minimal static selinux kernel_linux" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools )" - -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 - # resolvconf support in dhclient-script - epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch - # Fix setting hostnames on Linux - # merged in 3.1.3 - #epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch - # Allow mtu settings - # merged in 3.1.3 - #epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch - # Allow dhclient to use IF_METRIC to set route metrics - # merged in 3.1.3 - #epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-metric.patch - # Stop downing the interface on Linux as that breaks link dameons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}/${PN}"-3.1.3-dhclient-no-down.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-dhclient-stdin-conf.patch - # Disable fallback interfaces when using BPF - # This allows more than one dhclient instance on the BSD's - epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.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 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch - - # Denial of service through mixed identifier/ethernet host definitions - # merged in 3.1.3 - #epatch "${FILESDIR}/${P}"-CVE-2009-1892.patch - - # Brand the version with Gentoo - # include revision if >0 - local newver="${MY_PV}-Gentoo" - [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" - sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \ - includes/version.h || die - - # Change the hook script locations of the scripts - sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash, #158540. - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - # Build sed man pages as we don't ever support BSD 4.4 and older, #130251. - local x= - for x in Makefile.dist $(ls */Makefile.dist) ; do - sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die - done - - # 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() { - 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_CONF "/etc/dhcp/dhclient.conf" - #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases" - #define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid" - #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 - ADMMANEXT = .8 - FFMANDIR = /usr/share/man/man5 - FFMANEXT = .5 - LIBMANDIR = /usr/share/man/man3 - LIBMANEXT = .3 - USRMANDIR = /usr/share/man/man1 - USRMANEXT = .1 - MANCAT = man - END - - ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ - || die "configure failed" - - # Remove server support from the Makefile - # We still install some extra crud though - if use minimal ; then - sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die - fi - emake || die "compile problem" -} - -src_install() { - make install DESTDIR="${D}" || die - use doc && dodoc README RELNOTES doc/* - - insinto /etc/dhcp - newins client/dhclient.conf dhclient.conf.sample - keepdir /var/{lib,run}/dhcp - keepdir /var/lib/dhclient - - # Install our server files - if ! use minimal ; then - insinto /etc/dhcp - newins server/dhcpd.conf dhcpd.conf.sample - newinitd "${FILESDIR}"/dhcpd.init2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init dhcrelay - newconfd "${FILESDIR}"/dhcpd.conf dhcpd - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - - # We never want portage to own this file - rm -f "${D}"/var/lib/dhcp/dhcpd.leases - fi -} - -pkg_preinst() { - if ! use minimal ; then - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - fi -} - -pkg_postinst() { - use minimal && return - - chown -R 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() { - if use minimal ; then - eerror "${PN} has not been compiled for server support" - eerror "emerge ${PN} without the minimal USE flag to use dhcp sever" - return 1 - fi - - local CHROOT="$( - sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ - "${ROOT}"/etc/conf.d/dhcpd - )" - - if [[ -z ${CHROOT} ]]; then - eerror "CHROOT not defined in /etc/conf.d/dhcpd" - return 1 - fi - - CHROOT="${ROOT}/${CHROOT}" - - 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 - ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib - chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp - eend 0 - - 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-4.2.1_p1.ebuild b/net-misc/dhcp/dhcp-4.2.1_p1.ebuild deleted file mode 100644 index 9ebce5982631..000000000000 --- a/net-misc/dhcp/dhcp-4.2.1_p1.ebuild +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.1_p1.ebuild,v 1.4 2012/12/09 21:16:16 ulm Exp $ - -EAPI="2" - -inherit eutils - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools ) - vim-syntax? ( app-vim/dhcpd-syntax ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" - -S="${WORKDIR}/${MY_P}" - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.1-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.0.1-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.1-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash, #158540. - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP -} - -src_configure() { - econf \ - --enable-paranoia \ - --sysconfdir=/etc/dhcp \ - --with-cli-pid-file=/var/run/dhcp/dhclient.pid \ - --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ - --with-cli6-pid-file=/var/run/dhcp/dhclient6.pid \ - --with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \ - --with-srv-pid-file=/var/run/dhcp/dhcpd.pid \ - --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ - --with-srv6-pid-file=/var/run/dhcp/dhcpd6.pid \ - --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ - --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) -} - -src_install() { - emake install DESTDIR="${D}" || die - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script || die - else - newexe "${S}"/client/scripts/freebsd dhclient-script || die - fi - - insinto /etc/dhcp - doins client/dhclient.conf || die - - keepdir /var/lib/dhclient - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* || die - dosbin contrib/ldap/dhcpd-conf-to-ldap || die - fi - - newinitd "${FILESDIR}"/dhcpd.init3 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay - newconfd "${FILESDIR}"/dhcpd.conf dhcpd - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - - insinto /etc/dhcp - doins server/dhcpd.conf || die - - keepdir /var/{lib,run}/dhcp - fi -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones - local f - for f in dhclient dhcpd ; do - f="/etc/dhcp/${f}.conf" - if [ -e "${ROOT}"${f} ] ; then - cp -p "${ROOT}"${f} "${D}"${f} - fi - done -} - -pkg_postinst() { - chown -R 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 -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ - "${ROOT}"/etc/conf.d/dhcpd - )" - - if [[ -z ${CHROOT} ]]; then - eerror "CHROOT not defined in /etc/conf.d/dhcpd" - return 1 - fi - - CHROOT="${ROOT}/${CHROOT}" - - 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 - ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib - chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp - eend 0 - - 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-4.2.2-r1.ebuild b/net-misc/dhcp/dhcp-4.2.2-r1.ebuild deleted file mode 100644 index 4bac96fee52b..000000000000 --- a/net-misc/dhcp/dhcp-4.2.2-r1.ebuild +++ /dev/null @@ -1,265 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.2-r1.ebuild,v 1.5 2012/12/09 21:16:16 ulm Exp $ - -EAPI="2" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcprelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcprelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install || die - # then build standard dhcp code - emake || die -} - -src_install() { - emake install DESTDIR="${D}" || die - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script || die - else - newexe "${S}"/client/scripts/freebsd dhclient-script || die - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* || die - dosbin contrib/ldap/dhcpd-conf-to-ldap || die - fi - - newinitd "${FILESDIR}"/dhcpd.init3 dhcpd || die - newconfd "${FILESDIR}"/dhcpd.conf dhcpd || die - newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay || die - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay || die - - keepdir /var/{lib,run}/dhcp - fi -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones - local f - for f in dhclient dhcpd ; do - f="/etc/dhcp/${f}.conf" - if [ -e "${ROOT}"${f} ] ; then - cp -p "${ROOT}"${f} "${D}"${f} - fi - done -} - -pkg_postinst() { - chown -R 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 -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ - "${ROOT}"/etc/conf.d/dhcpd - )" - - if [[ -z ${CHROOT} ]]; then - eerror "CHROOT not defined in /etc/conf.d/dhcpd" - return 1 - fi - - CHROOT="${ROOT}/${CHROOT}" - - 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 - ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib - chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp - eend 0 - - 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-4.2.2-r2.ebuild b/net-misc/dhcp/dhcp-4.2.2-r2.ebuild deleted file mode 100644 index 145ea537af77..000000000000 --- a/net-misc/dhcp/dhcp-4.2.2-r2.ebuild +++ /dev/null @@ -1,233 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.2-r2.ebuild,v 1.12 2012/12/09 21:16:16 ulm Exp $ - -EAPI="2" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcprelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcprelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install || die - # then build standard dhcp code - emake || die -} - -src_install() { - emake install DESTDIR="${D}" || die - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script || die - else - newexe "${S}"/client/scripts/freebsd dhclient-script || die - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* || die - dosbin contrib/ldap/dhcpd-conf-to-ldap || die - fi - - newinitd "${FILESDIR}"/dhcpd.init4 dhcpd || die - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd || die - newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay || die - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay || die - fi - - # the default config files aren't terribly useful #384087 - sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${ROOT}"${f} ] ; then - case $(md5sum "${ROOT}"${f}) in - ${h}*) ;; - *) cp -p "${ROOT}"${f} "${D}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/dhcp-4.2.2-r3.ebuild b/net-misc/dhcp/dhcp-4.2.2-r3.ebuild deleted file mode 100644 index 1ac8a35a23c8..000000000000 --- a/net-misc/dhcp/dhcp-4.2.2-r3.ebuild +++ /dev/null @@ -1,234 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.2-r3.ebuild,v 1.3 2012/12/09 21:16:16 ulm Exp $ - -EAPI="2" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --enable-early-chroot \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install || die - # then build standard dhcp code - emake || die -} - -src_install() { - emake install DESTDIR="${D}" || die - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script || die - else - newexe "${S}"/client/scripts/freebsd dhclient-script || die - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* || die - dosbin contrib/ldap/dhcpd-conf-to-ldap || die - fi - - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd || die - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd || die - newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay || die - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay || die - fi - - # the default config files aren't terribly useful #384087 - sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${ROOT}"${f} ] ; then - case $(md5sum "${ROOT}"${f}) in - ${h}*) ;; - *) cp -p "${ROOT}"${f} "${D}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/dhcp-4.2.2.ebuild b/net-misc/dhcp/dhcp-4.2.2.ebuild deleted file mode 100644 index 66368086dcc1..000000000000 --- a/net-misc/dhcp/dhcp-4.2.2.ebuild +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.2.ebuild,v 1.5 2012/12/09 21:16:16 ulm Exp $ - -EAPI="2" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools ) - vim-syntax? ( app-vim/dhcpd-syntax ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash, #158540. - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - econf \ - --enable-paranoia \ - --sysconfdir=/etc/dhcp \ - --with-cli-pid-file=/var/run/dhcp/dhclient.pid \ - --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ - --with-cli6-pid-file=/var/run/dhcp/dhclient6.pid \ - --with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \ - --with-srv-pid-file=/var/run/dhcp/dhcpd.pid \ - --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ - --with-srv6-pid-file=/var/run/dhcp/dhcpd6.pid \ - --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ - --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install || die - # then build standard dhcp code - emake || die -} - -src_install() { - emake install DESTDIR="${D}" || die - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script || die - else - newexe "${S}"/client/scripts/freebsd dhclient-script || die - fi - - insinto /etc/dhcp - doins client/dhclient.conf || die - - keepdir /var/lib/dhclient - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* || die - dosbin contrib/ldap/dhcpd-conf-to-ldap || die - fi - - newinitd "${FILESDIR}"/dhcpd.init3 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay - newconfd "${FILESDIR}"/dhcpd.conf dhcpd - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - - insinto /etc/dhcp - doins server/dhcpd.conf || die - - keepdir /var/{lib,run}/dhcp - fi -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones - local f - for f in dhclient dhcpd ; do - f="/etc/dhcp/${f}.conf" - if [ -e "${ROOT}"${f} ] ; then - cp -p "${ROOT}"${f} "${D}"${f} - fi - done -} - -pkg_postinst() { - chown -R 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 -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ - "${ROOT}"/etc/conf.d/dhcpd - )" - - if [[ -z ${CHROOT} ]]; then - eerror "CHROOT not defined in /etc/conf.d/dhcpd" - return 1 - fi - - CHROOT="${ROOT}/${CHROOT}" - - 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 - ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib - chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp - eend 0 - - 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-4.2.3_p1.ebuild b/net-misc/dhcp/dhcp-4.2.3_p1.ebuild deleted file mode 100644 index 40ad9d3fabce..000000000000 --- a/net-misc/dhcp/dhcp-4.2.3_p1.ebuild +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.3_p1.ebuild,v 1.11 2012/12/09 21:16:16 ulm Exp $ - -EAPI="2" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - client? ( kernel_linux? ( sys-apps/net-tools ) ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --enable-early-chroot \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install || die - # then build standard dhcp code - emake || die -} - -src_install() { - emake install DESTDIR="${D}" || die - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script || die - else - newexe "${S}"/client/scripts/freebsd dhclient-script || die - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* || die - dosbin contrib/ldap/dhcpd-conf-to-ldap || die - fi - - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd || die - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd || die - newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay || die - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay || die - fi - - # the default config files aren't terribly useful #384087 - sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${ROOT}"${f} ] ; then - case $(md5sum "${ROOT}"${f}) in - ${h}*) ;; - *) cp -p "${ROOT}"${f} "${D}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/dhcp-4.2.3_p2.ebuild b/net-misc/dhcp/dhcp-4.2.3_p2.ebuild deleted file mode 100644 index e7b8e59a96ef..000000000000 --- a/net-misc/dhcp/dhcp-4.2.3_p2.ebuild +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.3_p2.ebuild,v 1.3 2012/12/09 21:16:16 ulm Exp $ - -EAPI="4" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - client? ( kernel_linux? ( sys-apps/net-tools ) ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --enable-early-chroot \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install - # then build standard dhcp code - emake -} - -src_install() { - emake install DESTDIR="${D}" - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* - dosbin contrib/ldap/dhcpd-conf-to-ldap - fi - - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 - newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 - fi - - # the default config files aren't terribly useful #384087 - sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${ROOT}"${f} ] ; then - case $(md5sum "${ROOT}"${f}) in - ${h}*) ;; - *) cp -p "${ROOT}"${f} "${D}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/dhcp-4.2.4_p1.ebuild b/net-misc/dhcp/dhcp-4.2.4_p1.ebuild deleted file mode 100644 index a9626a4272fb..000000000000 --- a/net-misc/dhcp/dhcp-4.2.4_p1.ebuild +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.4_p1.ebuild,v 1.10 2012/12/09 21:16:16 ulm Exp $ - -EAPI="4" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - client? ( kernel_linux? ( sys-apps/net-tools ) ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --enable-early-chroot \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install - # then build standard dhcp code - emake -} - -src_install() { - emake install DESTDIR="${D}" - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* - dosbin contrib/ldap/dhcpd-conf-to-ldap - fi - - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 - newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 - fi - - # the default config files aren't terribly useful #384087 - sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${ROOT}"${f} ] ; then - case $(md5sum "${ROOT}"${f}) in - ${h}*) ;; - *) cp -p "${ROOT}"${f} "${D}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/dhcp-4.2.4_p2-r1.ebuild b/net-misc/dhcp/dhcp-4.2.4_p2-r1.ebuild deleted file mode 100644 index 6f9dbc1ecc5f..000000000000 --- a/net-misc/dhcp/dhcp-4.2.4_p2-r1.ebuild +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.4_p2-r1.ebuild,v 1.7 2013/01/01 12:44:25 ago Exp $ - -EAPI="4" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - client? ( kernel_linux? ( sys-apps/net-tools ) ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - epatch "${FILESDIR}"/${PN}-4.2.1-dhclient-parse_option_param-Bad-format-a.patch #432998 - epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921 - epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108 - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --enable-early-chroot \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install - # then build standard dhcp code - emake AR="$(tc-getAR)" -} - -src_install() { - emake install DESTDIR="${D}" - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* - dosbin contrib/ldap/dhcpd-conf-to-ldap - fi - - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 - newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 - - sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 - fi - - # the default config files aren't terribly useful #384087 - sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${ROOT}"${f} ] ; then - case $(md5sum "${ROOT}"${f}) in - ${h}*) ;; - *) cp -p "${ROOT}"${f} "${D}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/dhcp-4.2.4_p2.ebuild b/net-misc/dhcp/dhcp-4.2.4_p2.ebuild deleted file mode 100644 index e7079bea26aa..000000000000 --- a/net-misc/dhcp/dhcp-4.2.4_p2.ebuild +++ /dev/null @@ -1,238 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.4_p2.ebuild,v 1.9 2012/12/09 21:16:16 ulm Exp $ - -EAPI="4" - -inherit eutils toolchain-funcs - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - client? ( kernel_linux? ( sys-apps/net-tools ) ) - ldap? ( - net-nds/openldap - ssl? ( dev-libs/openssl ) - )" -RDEPEND="${DEPEND} - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -src_prepare() { - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch - epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch - epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 - epatch "${FILESDIR}"/${PN}-4.2.1-dhclient-parse_option_param-Bad-format-a.patch #432998 - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-dbus.patch - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i \ - -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<client\>::' \ - Makefile.in || die - fi - - # 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 - rm -rf doc/ja_JP.eucJP - - # make the bind build work - binddir=${S}/bind - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch - cd bind-*/ - epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 - epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - econf \ - --enable-paranoia \ - --enable-early-chroot \ - --sysconfdir=${e} \ - $(use_enable ipv6 dhcpv6) \ - $(use_with ldap) \ - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install - # then build standard dhcp code - emake -} - -src_install() { - emake install DESTDIR="${D}" - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - dohtml doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* - dosbin contrib/ldap/dhcpd-conf-to-ldap - fi - - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 - newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 - fi - - # the default config files aren't terribly useful #384087 - sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${ROOT}"${f} ] ; then - case $(md5sum "${ROOT}"${f}) in - ${h}*) ;; - *) cp -p "${ROOT}"${f} "${D}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch b/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch deleted file mode 100644 index 4ab99a2b71a9..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch +++ /dev/null @@ -1,66 +0,0 @@ -Index: dhcp-3.0.2/Makefile -=================================================================== ---- dhcp-3.0.2.orig/Makefile -+++ dhcp-3.0.2/Makefile -@@ -33,7 +33,7 @@ all: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make all); \ -+ (cd work.$$sysname; $(MAKE) all); \ - fi - - install: -@@ -41,7 +41,7 @@ install: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make install); \ -+ (cd work.$$sysname; $(MAKE) install); \ - fi - - depend: -@@ -49,7 +49,7 @@ depend: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make depend); \ -+ (cd work.$$sysname; $(MAKE) depend); \ - fi - - clean: -@@ -57,7 +57,7 @@ clean: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make clean); \ -+ (cd work.$$sysname; $(MAKE) clean); \ - fi - - realclean: -@@ -65,7 +65,7 @@ realclean: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make realclean); \ -+ (cd work.$$sysname; $(MAKE) realclean); \ - fi - - distclean: -@@ -73,7 +73,7 @@ distclean: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make distclean); \ -+ (cd work.$$sysname; $(MAKE) distclean); \ - fi - - links: -@@ -81,6 +81,6 @@ links: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make links); \ -+ (cd work.$$sysname; $(MAKE) links); \ - fi - diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch deleted file mode 100644 index 579d72f48443..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -57,6 +57,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/linux -+++ client/scripts/linux -@@ -69,6 +69,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/openbsd -+++ client/scripts/openbsd -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch deleted file mode 100644 index 9a6e7b9698b1..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- client/scripts/linux -+++ client/scripts/linux -@@ -138,10 +138,12 @@ - [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then - current_hostname=`hostname` - if [ x$current_hostname = x ] || \ -+ [ x$current_hostname = "x(none)" ] || \ -+ [ x$current_hostname = xlocalhost ] || \ - [ x$current_hostname = x$old_host_name ]; then - if [ x$current_hostname = x ] || \ - [ x$new_host_name != x$old_host_name ]; then -- hostname $new_host_name -+ hostname "$new_host_name" - fi - fi - 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 deleted file mode 100644 index 040ef779d761..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch +++ /dev/null @@ -1,200 +0,0 @@ ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -84,6 +84,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -141,7 +144,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_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 -@@ -198,7 +201,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -94,6 +94,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -151,7 +154,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" -@@ -215,7 +218,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" ---- client/scripts/linux -+++ client/scripts/linux -@@ -83,11 +83,6 @@ - fi - fi - --release=`uname -r` --release=`expr $release : '\(.*\)\..*'` --relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'` --relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'` -- - if [ x$new_broadcast_address != x ]; then - new_broadcast_arg="broadcast $new_broadcast_address" - fi -@@ -106,6 +101,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - # Linux doesn't do mediums (ok, ok, media). -@@ -117,15 +115,7 @@ - # Bring down alias interface. Its routes will disappear too. - ifconfig $interface:0- inet 0 - fi -- if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ) -- then -- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ -- broadcast 255.255.255.255 up -- # Add route to make broadcast work. Do not omit netmask. -- route add default dev $interface netmask 0.0.0.0 -- else -- ifconfig $interface 0 up -- fi -+ ifconfig $interface 0 up - - # We need to give the kernel some time to get the interface up. - sleep 1 -@@ -164,12 +154,14 @@ - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg - # Add a network route to the computed network address. -- if [ $relmajor -lt 2 ] || \ -- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -- route add -net $new_network_number $new_subnet_arg dev $interface -+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then -+ route del -net $new_network_number $new_subnet_arg \ -+ dev $interface -+ route add -net $new_network_number $new_subnet_arg $metric_arg \ -+ dev $interface - fi - for router in $new_routers; do -- route add default gw $router -+ route add default gw $router $metric_arg dev $interface - done - fi - if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; -@@ -213,12 +205,15 @@ - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address dev $interface:0 - fi -- if [ $relmajor -lt 2 ] || \ -- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -- route add -net $new_network_number -+ # Add a network route to the computed network address. -+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then -+ route del -net $new_network_number $new_subnet_arg \ -+ dev $interface -+ route add -net $new_network_number $new_subnet_arg $metric_arg \ -+ dev $interface - fi - for router in $new_routers; do -- route add default gw $router -+ route add default gw $router $metric_arg dev $interface - done - make_resolv_conf - exit_with_hooks 0 ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -84,6 +84,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -141,7 +144,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_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 -@@ -198,7 +201,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -79,6 +79,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - ifconfig=/sbin/ifconfig - -@@ -141,7 +144,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - route add $new_ip_address 127.1 1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router 1 >/dev/null 2>&1 -@@ -182,7 +185,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - sleep 1 - set $new_routers - if ping -s -n -I 1 $1 64 1; then diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch deleted file mode 100644 index 5ef4442d88aa..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch +++ /dev/null @@ -1,180 +0,0 @@ ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_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 -@@ -195,7 +198,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -91,6 +91,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -148,7 +151,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" -@@ -212,7 +215,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" ---- client/scripts/linux -+++ client/scripts/linux -@@ -103,6 +103,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - # Linux doesn't do mediums (ok, ok, media). -@@ -159,7 +162,7 @@ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - - ifconfig $interface inet $new_ip_address $new_subnet_arg \ -- $new_broadcast_arg -+ $new_broadcast_arg $mtu_arg - # Add a network route to the computed network address. - if [ $relmajor -lt 2 ] || \ - ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -@@ -201,7 +204,7 @@ - ifconfig $interface:0- inet 0 - fi - ifconfig $interface inet $new_ip_address $new_subnet_arg \ -- $new_broadcast_arg -+ $new_broadcast_arg $mtu_arg - set $new_routers - ############## what is -w in ping? - if ping -q -c 1 $1; then ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_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 -@@ -195,7 +198,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/openbsd -+++ client/scripts/openbsd -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_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 -@@ -195,7 +198,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -76,6 +76,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - ifconfig=/sbin/ifconfig - -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - route add $new_ip_address 127.1 1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router 1 >/dev/null 2>&1 -@@ -179,7 +182,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - set $new_routers - if ping -s -n -I 1 $1 64 1; then 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 deleted file mode 100644 index d84e6f6138a9..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch +++ /dev/null @@ -1,186 +0,0 @@ ---- client/clparse.c -+++ client/clparse.c -@@ -51,6 +51,7 @@ - DHO_DOMAIN_NAME, - DHO_DOMAIN_NAME_SERVERS, - DHO_HOST_NAME, -+ DHO_NTP_SERVERS, - 0 - }; - ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -7,6 +7,26 @@ - 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$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ 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" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -32,8 +32,28 @@ - done - fi - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf - } - -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ 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" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ 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,26 @@ - 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$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ 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" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -7,6 +7,26 @@ - 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$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ 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" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/openbsd -+++ client/scripts/openbsd -@@ -7,6 +7,26 @@ - 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$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ 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" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -7,6 +7,26 @@ - 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$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ 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" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ 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-libdst.patch b/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch deleted file mode 100644 index 8e93ac95bc40..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- dst/Makefile.dist.old 2004-12-24 13:31:22.986061032 +0000 -+++ dst/Makefile.dist 2004-12-24 13:47:19.036913364 +0000 -@@ -31,6 +31,10 @@ - all: libdst.a - - install: -+ mkdir -p $(DESTDIR)$(LIBDIR) -+ $(INSTALL) libdst.a $(DESTDIR)$(LIBDIR) -+ $(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libdst.a -+ - - libdst.a: $(OBJ) - rm -f dst.a - diff --git a/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch b/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch deleted file mode 100644 index 38f7713f5c62..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch +++ /dev/null @@ -1,105 +0,0 @@ -Patch nobbled from RedHat, and adapted to work with dhclient and dhrelay -by Roy Marples <uberlord@gentoo.org> - ---- dhcp-3.0.3/omapip/errwarn.c.no_isc_blurb 2004-09-30 16:38:32.000000000 -0400 -+++ dhcp-3.0.3/omapip/errwarn.c 2005-04-18 13:45:49.037158000 -0400 -@@ -45,6 +45,8 @@ - int log_perror = 1; - #endif - int log_priority; -+int log_isc_blurb=1; -+ - void (*log_cleanup) (void); - - #define CVT_BUF_MAX 1023 -@@ -76,7 +78,9 @@ - write (STDERR_FILENO, "\n", 1); - } - --#if !defined (NOMINUM) -+#if !defined(NOMINUM) -+ if ( log_isc_blurb ) -+ { - log_error ("%s", ""); - log_error ("If you did not get this software from ftp.isc.org, please"); - log_error ("get the latest from ftp.isc.org and install that before"); -@@ -94,7 +98,12 @@ - log_error ("the README file."); - log_error ("%s", ""); - log_error ("exiting."); -+ }else -+ { -+ log_error ("exiting."); -+ } - #endif -+ - if (log_cleanup) - (*log_cleanup) (); - exit (1); ---- dhcp-3.0.3/client/dhclient.c.no_isc_blurb 2005-04-18 13:21:08.509169000 -0400 -+++ dhcp-3.0.3/client/dhclient.c 2005-04-18 13:49:27.574402000 -0400 -@@ -34,7 +34,7 @@ - static char ocopyright[] = - "$Id: dhcp-3.0.3-no_isc_blurb.patch,v 1.1 2005/12/09 14:13:30 uberlord Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; - #endif /* not lint */ -- -+ - #include "dhcpd.h" - #include "version.h" - -@@ -81,6 +81,8 @@ - - void do_release(struct client_state *); - -+extern int log_isc_blurb; -+ - int main (argc, argv, envp) - int argc; - char **argv, **envp; -@@ -176,6 +178,7 @@ - } else if (!strcmp (argv [i], "-q")) { - quiet = 1; - quiet_interface_discovery = 1; -+ log_isc_blurb = 0; - } else if (!strcmp (argv [i], "-s")) { - if (++i == argc) - usage (); ---- dhcp-3.0.3/server/dhcpd.c.no_isc_blurb 2005-12-08 10:01:40.000000000 +0000 -+++ dhcp-3.0.3/server/dhcpd.c 2005-12-08 10:05:55.000000000 +0000 -@@ -62,6 +62,9 @@ - struct iaddr server_identifier; - int server_identifier_matched; - -+ -+extern int log_isc_blurb; -+ - #if defined (NSUPDATE) - - /* This stuff is always executed to figure the default values for certain -@@ -368,6 +371,7 @@ - } else if (!strcmp (argv [i], "-q")) { - quiet = 1; - quiet_interface_discovery = 1; -+ log_isc_blurb = 0; - } else if (!strcmp (argv [i], "--version")) { - log_info ("isc-dhcpd-%s", DHCP_VERSION); - exit (0); ---- dhcp-3.0.3/relay/dhcrelay.c.no_isc_blurb 2005-12-08 10:21:00.000000000 +0000 -+++ dhcp-3.0.3/relay/dhcrelay.c 2005-12-08 10:21:50.000000000 +0000 -@@ -102,6 +102,8 @@ - static char message [] = "Internet Systems Consortium DHCP Relay Agent"; - static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/"; - -+extern int log_isc_blurb; -+ - int main (argc, argv, envp) - int argc; - char **argv, **envp; -@@ -170,6 +172,7 @@ - } else if (!strcmp (argv [i], "-q")) { - quiet = 1; - quiet_interface_discovery = 1; -+ log_isc_blurb = 0; - } else if (!strcmp (argv [i], "-a")) { - add_agent_options = 1; - } else if (!strcmp (argv [i], "-c")) { diff --git a/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch deleted file mode 100644 index 3fedc7c0e80b..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- common/conflex.c.orig 2006-02-21 16:21:45.000000000 +0000 -+++ common/conflex.c 2006-02-21 16:23:06.000000000 +0000 -@@ -90,7 +90,7 @@ - struct parse **cfile; - { - /* "Memory" config files have no file. */ -- if ((*cfile)->file != -1) -+ if ((*cfile)->file != -1 && (*cfile)->file != fileno(stdin)) - close((*cfile)->file); - - if ((*cfile)->bufsiz) ---- client/clparse.c.orig 2006-02-22 09:37:12.000000000 +0000 -+++ client/clparse.c 2006-02-22 09:38:26.000000000 +0000 -@@ -97,6 +97,11 @@ - status = read_client_conf_file (path_dhclient_conf, - (struct interface_info *)0, - &top_level_config); -+ -+ /* Read any extra configuration from stdin */ -+ read_client_conf_stdin ((struct interface_info *)0, -+ &top_level_config); -+ - if (status != ISC_R_SUCCESS) { - ; - #ifdef LATER -@@ -148,20 +153,17 @@ - return status; - } - --int read_client_conf_file (const char *name, struct interface_info *ip, -- struct client_config *client) -+int read_client_conf_actual (int file, const char *name, -+ struct interface_info *ip, -+ struct client_config *client) - { -- int file; - struct parse *cfile; - const char *val; - int token; - isc_result_t status; - -- if ((file = open (name, O_RDONLY)) < 0) -- return uerr2isc (errno); -- - cfile = (struct parse *)0; -- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); -+ new_parse (&cfile, file, (char *)0, 0, name , 0); - - do { - token = peek_token (&val, (unsigned *)0, cfile); -@@ -177,6 +179,32 @@ - return status; - } - -+int read_client_conf_file (const char *name, struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ isc_result_t status; -+ -+ if ((file = open (name, O_RDONLY)) < 0) -+ return uerr2isc (errno); -+ -+ status = read_client_conf_actual(file, name, ip, client); -+ -+ return status; -+} -+ -+ -+int read_client_conf_stdin (struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file = fileno(stdin); -+ isc_result_t status; -+ -+ if (isatty(file)) return ISC_R_NOTFOUND; -+ status = read_client_conf_actual(file, "stdin", ip, client); -+ -+ return status; -+} - - /* lease-file :== client-lease-statements END_OF_FILE - client-lease-statements :== <nil> diff --git a/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch b/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch deleted file mode 100644 index 2fae6f2204af..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ur common.orig/bpf.c common/bpf.c ---- common.orig/bpf.c 2006-09-20 12:52:47 +0100 -+++ common/bpf.c 2006-09-20 12:53:22 +0100 -@@ -354,10 +354,6 @@ - int result; - int fudge; - -- if (!strcmp (interface -> name, "fallback")) -- return send_fallback (interface, packet, raw, -- len, from, to, hto); -- - /* Assemble the headers... */ - assemble_hw_header (interface, (unsigned char *)hw, &hbufp, hto); - assemble_udp_ip_header (interface, -@@ -531,17 +527,5 @@ - - void maybe_setup_fallback () - { -- isc_result_t status; -- struct interface_info *fbi = (struct interface_info *)0; -- if (setup_fallback (&fbi, MDL)) { -- if_register_fallback (fbi); -- status = omapi_register_io_object ((omapi_object_t *)fbi, -- if_readsocket, 0, -- fallback_discard, 0, 0); -- if (status != ISC_R_SUCCESS) -- log_fatal ("Can't register I/O handle for %s: %s", -- fbi -> name, isc_result_totext (status)); -- interface_dereference (&fbi, MDL); -- } - } - #endif -diff -ur includes.orig/osdep.h includes/osdep.h ---- includes.orig/osdep.h 2006-09-20 12:54:52 +0100 -+++ includes/osdep.h 2006-09-20 12:56:40 +0100 -@@ -190,7 +190,7 @@ - Currently, all low-level packet interfaces use BSD sockets as a - fallback. */ - --#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \ -+#if defined (USE_NIT_SEND) || \ - defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || \ - defined (USE_LPF_SEND) || \ - (defined (USE_SOCKET_SEND) && defined (HAVE_SO_BINDTODEVICE)) diff --git a/net-misc/dhcp/files/dhcp-3.1.0a1-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-3.1.0a1-dhclient-resolvconf.patch deleted file mode 100644 index 5c420ae6e0f4..000000000000 --- a/net-misc/dhcp/files/dhcp-3.1.0a1-dhclient-resolvconf.patch +++ /dev/null @@ -1,254 +0,0 @@ -diff -ur client.orig/scripts/bsdos client/scripts/bsdos ---- client.orig/scripts/bsdos 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/bsdos 2006-09-07 19:19:53.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; 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 -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >> /etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/freebsd client/scripts/freebsd ---- client.orig/scripts/freebsd 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/freebsd 2006-09-07 19:19:32.000000000 +0100 -@@ -11,38 +11,20 @@ - fi - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- ( cat /dev/null > /etc/resolv.conf.dhclient ) -- exit_status=$? -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" -- else -- if [ "x$new_domain_search" != x ]; then -- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) -- exit_status=$? -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; 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 -+ conf="${conf}search $new_domain_name\n" - fi - for nameserver in $new_domain_name_servers; do -- if [ $exit_status -ne 0 ]; then -- break -- fi -- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) -- exit_status=$? -+ conf="${conf}nameserver $nameserver\n" - done -- -- # If there were no errors, attempt to mv the new file into place. -- if [ $exit_status -eq 0 ]; then -- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) -- exit_status = $? -- fi -- -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Error while writing new /etc/resolv.conf." -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf - fi - fi - fi -diff -ur client.orig/scripts/linux client/scripts/linux ---- client.orig/scripts/linux 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/linux 2006-09-07 19:18:57.000000000 +0100 -@@ -23,22 +23,22 @@ - # of the $1 in its args. - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- chmod 644 /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; 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 -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/netbsd client/scripts/netbsd ---- client.orig/scripts/netbsd 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/netbsd 2006-09-07 19:20:10.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ "x$new_domain_search != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ "x$new_domain_name != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; 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 -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/openbsd client/scripts/openbsd ---- client.orig/scripts/openbsd 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/openbsd 2006-09-07 19:20:38.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; 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 -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/ersolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/solaris client/scripts/solaris ---- client.orig/scripts/solaris 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/solaris 2006-09-07 19:21:12.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; 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 -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf diff --git a/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch b/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch deleted file mode 100644 index ae1b92af8a7d..000000000000 --- a/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr dhcp-3.1.2.ORIG/server/dhcp.c dhcp-3.1.2/server/dhcp.c ---- dhcp-3.1.2.ORIG/server/dhcp.c 2009-07-13 14:26:15.000000000 +0100 -+++ dhcp-3.1.2/server/dhcp.c 2009-07-13 14:26:33.000000000 +0100 -@@ -1747,6 +1747,8 @@ - host_reference (&host, h, MDL); - } - if (!host) { -+ if (hp) -+ host_dereference (&hp, MDL); - find_hosts_by_haddr (&hp, - packet -> raw -> htype, - packet -> raw -> chaddr, diff --git a/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch deleted file mode 100644 index ddbe4a39d5a4..000000000000 --- a/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch +++ /dev/null @@ -1,114 +0,0 @@ -diff -uNr dhcp-4.0.1.ORIG/client/clparse.c dhcp-4.0.1/client/clparse.c ---- dhcp-4.0.1.ORIG/client/clparse.c 2009-03-30 13:54:47.000000000 +0100 -+++ dhcp-4.0.1/client/clparse.c 2009-03-30 13:58:02.000000000 +0100 -@@ -174,6 +174,10 @@ - #endif - } - -+ /* Read any extra configuration from stdin */ -+ read_client_conf_stdin ((struct interface_info *)0, -+ &top_level_config); -+ - /* Set up state and config structures for clients that don't - have per-interface configuration statements. */ - config = (struct client_config *)0; -@@ -203,23 +207,13 @@ - return status; - } - --int read_client_conf_file (const char *name, struct interface_info *ip, -+int read_client_conf_actual (struct parse *cfile, struct interface_info *ip, - struct client_config *client) - { -- int file; -- struct parse *cfile; - const char *val; - int token; - isc_result_t status; - -- if ((file = open (name, O_RDONLY)) < 0) -- return uerr2isc (errno); -- -- cfile = NULL; -- status = new_parse(&cfile, file, NULL, 0, path_dhclient_conf, 0); -- if (status != ISC_R_SUCCESS || cfile == NULL) -- return status; -- - do { - token = peek_token (&val, (unsigned *)0, cfile); - if (token == END_OF_FILE) -@@ -230,10 +224,74 @@ - status = (cfile -> warnings_occurred - ? ISC_R_BADPARSE - : ISC_R_SUCCESS); -+ return status; -+} -+ -+int read_client_conf_file (const char *name, struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ struct parse *cfile; -+ isc_result_t status; -+ -+ if ((file = open (name, O_RDONLY)) < 0) -+ return uerr2isc (errno); -+ -+ cfile = (struct parse *)0; -+ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); -+ status = read_client_conf_actual(cfile, ip, client); - end_parse (&cfile); - return status; - } - -+int read_client_conf_stdin (struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ char *buffer = NULL, *p; -+ unsigned buflen, len = 0; -+ struct parse *cfile; -+ size_t bytes; -+ isc_result_t status; -+ -+ file = fileno(stdin); -+ if (isatty (file)) -+ return ISC_R_NOTFOUND; -+ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0) -+ log_fatal ("could not set stdin to non blocking!"); -+ -+ buflen = BUFSIZ; -+ buffer = malloc (BUFSIZ + 1); -+ p = buffer; -+ do { -+ bytes = read (file, p, BUFSIZ); -+ if (bytes == 0) -+ break; -+ if (bytes == -1) -+ log_fatal ("failed to read stdin!"); -+ if (bytes >= BUFSIZ) { -+ buflen += BUFSIZ; -+ len += BUFSIZ; -+ buffer = realloc (buffer, buflen + 1); -+ if (!buffer) -+ log_fatal ("not enough buffer to read stdin!"); -+ p = buffer + len; -+ } else { -+ len += bytes; -+ break; -+ } -+ } while(1); -+ buffer[len] = '\0'; -+ -+ cfile = (struct parse *)0; -+ status = new_parse (&cfile, -1, buffer, len, "stdin", 0); -+ if (status == ISC_R_SUCCESS) { -+ status = read_client_conf_actual (cfile, ip, client); -+ end_parse (&cfile); -+ } -+ free(buffer); -+ return status; -+} - - /* lease-file :== client-lease-statements END_OF_FILE - client-lease-statements :== <nil> diff --git a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-parse_option_param-Bad-format-a.patch b/net-misc/dhcp/files/dhcp-4.2.1-dhclient-parse_option_param-Bad-format-a.patch deleted file mode 100644 index 991dddcc48d7..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-parse_option_param-Bad-format-a.patch +++ /dev/null @@ -1,44 +0,0 @@ -https://bugs.gentoo.org/432998 - -snipped from OpenSUSE - -From 19248f4207e55ecb1f5cdd9eb084f1a69470afaf Mon Sep 17 00:00:00 2001 -From: Marius Tomaschewski <mt@suse.de> -Date: Thu, 5 Jan 2012 16:20:42 +0100 -Subject: [PATCH] dhclient: parse_option_param: Bad format a - -When the server provides options using the "a" array type, such as: -option rfc3442-classless-routes code 121 = array of unsigned integer 8; -the option is stored into the lease file, but when the client reads the -lease file next time, it complains about, because "a" array type aren't -recognized in the parsing loop and the option (lease?) discarded. - -Signed-off-by: Marius Tomaschewski <mt@suse.de> ---- - common/parse.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common/parse.c b/common/parse.c -index 865522e..b4a821b 100644 ---- a/common/parse.c -+++ b/common/parse.c -@@ -5409,7 +5409,7 @@ int parse_option_decl (oc, cfile) - /* Parse the option data... */ - do { - for (fmt = option -> format; *fmt; fmt++) { -- if (*fmt == 'A') -+ if (*fmt == 'A' || *fmt == 'a') - break; - if (*fmt == 'o' && fmt != option -> format) - continue; -@@ -5623,7 +5623,7 @@ int parse_option_decl (oc, cfile) - } - } - token = next_token (&val, (unsigned *)0, cfile); -- } while (*fmt == 'A' && token == COMMA); -+ } while ((*fmt == 'A' || *fmt == 'a') && token == COMMA); - - if (token != SEMI) { - parse_warn (cfile, "semicolon expected."); --- -1.7.7 diff --git a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.2.1-dhclient-resolvconf.patch deleted file mode 100644 index fbbe65ad2061..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-resolvconf.patch +++ /dev/null @@ -1,384 +0,0 @@ ---- a/client/scripts/bsdos -+++ b/client/scripts/bsdos -@@ -1,34 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient - if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_search}\n" - elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >> /etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${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 - } ---- a/client/scripts/freebsd -+++ b/client/scripts/freebsd -@@ -11,68 +11,41 @@ - fi - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- ( cat /dev/null > /etc/resolv.conf.dhclient ) -- exit_status=$? -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" -- else -- if [ "x$new_domain_search" != x ]; then -- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- fi -- for nameserver in $new_domain_name_servers; do -- if [ $exit_status -ne 0 ]; then -- break -- fi -- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) -- exit_status=$? -- done -- -- # If there were no errors, attempt to mv the new file into place. -- if [ $exit_status -eq 0 ]; then -- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) -- exit_status=$? -- fi -- -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then -+ # Note that the DHCP 'Domain Name Option' is really just a domain -+ # name, and that this practice of using the domain name option as -+ # a search path is both nonstandard and deprecated. -+ conf="${conf}search ${new_domain_name}\n" - fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver ${nameserver}\n" -+ done - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- ( cat /dev/null > /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status" -- else -- if [ "x${new_dhcp6_domain_search}" != x ] ; then -- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- fi -- for nameserver in ${new_dhcp6_name_servers} ; do -- if [ $exit_status -ne 0 ] ; then -- break -- fi -- ( echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- done -- -- if [ $exit_status -eq 0 ] ; then -- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ) -- exit_status=$? -- fi -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}\n" -+ done -+ fi - -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${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 - } ---- a/client/scripts/linux -+++ b/client/scripts/linux -@@ -26,35 +26,41 @@ - ip=/sbin/ip - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- chmod 644 /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${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 - } ---- a/client/scripts/netbsd -+++ b/client/scripts/netbsd -@@ -1,34 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ "x$new_domain_name" != x ]; then -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= -+ if [ x"$new_domain_name_servers" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${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 - } ---- a/client/scripts/openbsd -+++ b/client/scripts/openbsd -@@ -1,34 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -- if x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= -+ if [ x"$new_domain_name_servers" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/ersolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${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 - } ---- a/client/scripts/solaris -+++ b/client/scripts/solaris -@@ -1,22 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" -+ done -+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${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 - } diff --git a/net-misc/dhcp/files/dhcp-4.2.1-nogateway.patch b/net-misc/dhcp/files/dhcp-4.2.1-nogateway.patch deleted file mode 100644 index 11aaacefd476..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.1-nogateway.patch +++ /dev/null @@ -1,46 +0,0 @@ -http://bugs.gentoo.org/265531 - ---- dhcp-4.2.1/client/scripts/linux -+++ dhcp-4.2.1/client/scripts/linux -@@ -193,12 +193,14 @@ - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg - # Add a network route to the computed network address. -- for router in $new_routers; do -- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -- route add -host $router dev $interface -- fi -- route add default gw $router $metric_arg dev $interface -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ for router in $new_routers; do -+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -+ route add -host $router dev $interface -+ fi -+ route add default gw $router $metric_arg dev $interface -+ done -+ fi - fi - if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; - then -@@ -244,12 +246,14 @@ - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address dev $interface:0 - fi -- for router in $new_routers; do -- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -- route add -host $router dev $interface -- fi -- route add default gw $router $metric_arg dev $interface -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ for router in $new_routers; do -+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -+ route add -host $router dev $interface -+ fi -+ route add default gw $router $metric_arg dev $interface -+ done -+ fi - make_resolv_conf - exit_with_hooks 0 - fi diff --git a/net-misc/dhcp/files/dhcpd.conf b/net-misc/dhcp/files/dhcpd.conf deleted file mode 100644 index 1672633c894d..000000000000 --- a/net-misc/dhcp/files/dhcpd.conf +++ /dev/null @@ -1,29 +0,0 @@ -# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd - -# If you require more than one instance of dhcpd you can create symbolic -# links to dhcpd service like so -# cd /etc/init.d -# ln -s dhcpd dhcpd.foo -# cd ../conf.d -# cp dhcpd dhcpd.foo -# Now you can edit dhcpd.foo and specify a different configuration file. -# You'll also need to specify a pidfile in that dhcpd.conf file. -# See the pid-file-name option in the dhcpd.conf man page for details. - -# If you wish to run dhcpd in a chroot, uncomment the following line -# DHCPD_CHROOT="/chroot/dhcp" - -# Then run emerge dhcp --config -# All file paths below are relative to the chroot. -# You can specify a different chroot directory but MAKE SURE it's empty. - -# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf -# DHCPD_CONF="/etc/dhcp/dhcpd.conf" - -# Configure which interface or interfaces to for dhcpd to listen on. -# List all interfaces space separated. If this is not specified then -# we listen on all interfaces. -# DHCPD_IFACE="" - -# Insert any other dhcpd options - see the man page for a full list. -# DHCPD_OPTS="" diff --git a/net-misc/dhcp/files/dhcpd.init2 b/net-misc/dhcp/files/dhcpd.init2 deleted file mode 100644 index 82cb26e77901..000000000000 --- a/net-misc/dhcp/files/dhcpd.init2 +++ /dev/null @@ -1,94 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init2,v 1.1 2009/07/09 14:45:22 chainsaw Exp $ - -opts="configtest" - -DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf} - -depend() { - need net - use logger dns -} - -get_var() { - sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \ - "${DHCPD_CHROOT}/${DHCPD_CONF}" -} - -checkconfig() { - /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t 1>/dev/null 2>&1 - ret=$? - if [ $ret -ne 0 ]; then - eerror "${SVCNAME} has detected a syntax error in your configuration files:" - /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t - fi - - return $ret -} - -configtest() { - ebegin "Checking ${SVCNAME} configuration" - checkconfig - eend $? -} - -start() { - # Work out our cffile if it's on our DHCPD_OPTS - case " ${DHCPD_OPTS} " in - *" -cf "*) - DHCPD_CONF=" ${DHCPD_OPTS} " - DHCPD_CONF="${DHCPD_CONF##* -cf }" - DHCPD_CONF="${DHCPD_CONF%% *}" - ;; - *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" - ;; - esac - - if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then - eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist" - return 1 - fi - - checkconfig || return 1 - - local leasefile="$(get_var lease-file-name)" - leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" - if [ ! -f "${leasefile}" ] ; then - ebegin "Creating ${leasefile}" - touch "${leasefile}" - chown dhcp:dhcp "${leasefile}" - eend $? || return 1 - fi - - # Setup LD_PRELOAD so name resolution works in our chroot. - if [ -n "${DHCPD_CHROOT}" ] ; then - LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so" - export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so" - fi - - local pidfile="$(get_var pid-file-name)" - pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}" - - ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" - start-stop-daemon --start --exec /usr/sbin/dhcpd \ - --pidfile "${DHCPD_CHROOT}/${pidfile}" \ - -- ${DHCPD_OPTS} -q -pf "${pidfile}" \ - -user dhcp -group dhcp \ - ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} - eend $? \ - && save_options chroot "${DHCPD_CHROOT}" \ - && save_options pidfile "${pidfile}" -} - -stop() { - local chroot="$(get_options chroot)" - - checkconfig || return 1 - - ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/$(get_options pidfile)" - eend $? -} diff --git a/net-misc/dhcp/files/dhcpd.init3 b/net-misc/dhcp/files/dhcpd.init3 deleted file mode 100755 index 3b00531429a0..000000000000 --- a/net-misc/dhcp/files/dhcpd.init3 +++ /dev/null @@ -1,94 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init3,v 1.1 2011/03/05 23:59:20 vapier Exp $ - -opts="configtest" - -DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/${SVCNAME}.conf} - -depend() { - need net - use logger dns -} - -get_var() { - sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \ - "${DHCPD_CHROOT}/${DHCPD_CONF}" -} - -checkconfig() { - dhcpd ${DHCPD_OPTS} ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} -t 1>/dev/null 2>&1 - local ret=$? - if [ $ret -ne 0 ] ; then - eerror "${SVCNAME} has detected a syntax error in your configuration files:" - dhcpd ${DHCPD_OPTS} ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} -t - fi - - return $ret -} - -configtest() { - ebegin "Checking ${SVCNAME} configuration" - checkconfig - eend $? -} - -start() { - # Work out our cffile if it's in our DHCPD_OPTS - case " ${DHCPD_OPTS} " in - *" -cf "*) - DHCPD_CONF=" ${DHCPD_OPTS} " - DHCPD_CONF="${DHCPD_CONF##* -cf }" - DHCPD_CONF="${DHCPD_CONF%% *}" - ;; - *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" - ;; - esac - - if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then - eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist" - return 1 - fi - - checkconfig || return 1 - - checkpath -d -o dhcp:dhcp /var/run/dhcp /var/lib/dhcp - - local leasefile="$(get_var lease-file-name)" - leasefile="${leasefile:-/var/lib/dhcp/${SVCNAME}.leases}" - if [ ! -f "${DHCPD_CHROOT}${leasefile}" ] ; then - ebegin "Creating ${leasefile}" - touch "${DHCPD_CHROOT}${leasefile}" - chown dhcp:dhcp "${DHCPD_CHROOT}${leasefile}" - eend $? || return 1 - fi - - # Setup LD_PRELOAD so name resolution works in our chroot. - if [ -n "${DHCPD_CHROOT}" ] ; then - LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so" - export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so" - fi - - local pidfile="$(get_var pid-file-name)" - pidfile="${pidfile:-/var/run/dhcp/${SVCNAME}.pid}" - - ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" - start-stop-daemon --start --exec /usr/sbin/dhcpd \ - --pidfile "${DHCPD_CHROOT}/${pidfile}" \ - -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \ - -user dhcp -group dhcp \ - ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} - eend $? \ - && save_options chroot "${DHCPD_CHROOT}" \ - && save_options pidfile "${pidfile}" -} - -stop() { - local chroot="$(get_options chroot)" - - ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/$(get_options pidfile)" - eend $? -} diff --git a/net-misc/dhcp/files/dhcpd.init4 b/net-misc/dhcp/files/dhcpd.init4 deleted file mode 100755 index b071d8f0c44d..000000000000 --- a/net-misc/dhcp/files/dhcpd.init4 +++ /dev/null @@ -1,113 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init4,v 1.2 2011/09/22 19:38:41 vapier Exp $ - -extra_commands="configtest" - -: ${DHCPD_CONF:=/etc/dhcp/${SVCNAME}.conf} - -depend() { - need net - use logger dns -} - -get_var() { - # we read the conf outside of the chroot as we do - # not configure with --enable-early-chroot - local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${DHCPD_CONF}")" - echo ${var:-$2} -} - -checkconfig() { - set -- ${DHCPD_OPTS} ${chroot:+-chroot} ${chroot} -t - - dhcpd "$@" 1>/dev/null 2>&1 - local ret=$? - if [ ${ret} -ne 0 ] ; then - eerror "${SVCNAME} has detected a syntax error in your configuration files:" - dhcpd "$@" - fi - - return ${ret} -} - -configtest() { - local chroot=${DHCPD_CHROOT} - - ebegin "Checking ${SVCNAME} configuration" - checkconfig - eend $? -} - -start() { - local chroot=${DHCPD_CHROOT} - - # Work out our cffile if it's in our DHCPD_OPTS - case " ${DHCPD_OPTS} " in - *" -cf "*) - DHCPD_CONF=" ${DHCPD_OPTS} " - DHCPD_CONF="${DHCPD_CONF##* -cf }" - DHCPD_CONF="${DHCPD_CONF%% *}" - ;; - *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" - ;; - esac - - # see comment in get_var() above - if [ ! -f "${DHCPD_CONF}" ] ; then - eerror "${DHCPD_CONF} does not exist" - return 1 - fi - - if [ -n "${chroot}" ] ; then - # the config test want's these to exist - mkdir -p "${chroot}"/var/run/dhcp "${chroot}"/var/lib/dhcp - fi - - checkconfig || return 1 - - checkpath -d -o dhcp:dhcp "${chroot}"/var/run/dhcp "${chroot}"/var/lib/dhcp - - local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)" - checkpath -f -o dhcp:dhcp "${chroot}${leasefile}" - - # Setup LD_PRELOAD so name resolution works in our chroot. - if [ -n "${chroot}" ] ; then - checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc - cp -pP /etc/localtime /etc/resolv.conf "${chroot}"/etc/ - export LD_PRELOAD="${LD_PRELOAD} libresolv.so libnss_dns.so" - if ! mountinfo -q "${chroot}/proc" ; then - mount --bind /proc "${chroot}/proc" - fi - fi - - local pidfile="$(get_var pid-file-name /var/run/dhcp/${SVCNAME}.pid)" - - ebegin "Starting ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --start --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/${pidfile}" \ - -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \ - -user dhcp -group dhcp \ - ${chroot:+-chroot} ${chroot} ${DHCPD_IFACE} - eend $? \ - && save_options chroot "${chroot}" \ - && save_options pidfile "${pidfile}" -} - -stop() { - local chroot="$(get_options chroot)" - - ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/$(get_options pidfile)" - res=$? - - if [ ${res} -eq 0 ] && [ -n "${chroot}" ] ; then - if mountinfo -q "${chroot}/proc" ; then - umount "${chroot}/proc" - fi - fi - - eend $res -} diff --git a/net-misc/dhcp/files/dhcrelay.init b/net-misc/dhcp/files/dhcrelay.init deleted file mode 100644 index 2f92956be8fc..000000000000 --- a/net-misc/dhcp/files/dhcrelay.init +++ /dev/null @@ -1,32 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init,v 1.2 2007/03/22 15:36:59 uberlord Exp $ - -depend() { - need net - use logger -} - -start() { - if [ -z "${DHCRELAY_SERVERS}" ]; then - eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/dhcrelay" - return 1 - fi - - local IFACES= i= - for i in ${IFACE} ; do - IFACES="${IFACES} -i ${i}" - done - - ebegin "Starting dhcrelay" - start-stop-daemon --start --exec /usr/sbin/dhcrelay \ - -- -q ${IFACES} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} - eend $? -} - -stop() { - ebegin "Stopping dhcrelay" - start-stop-daemon --stop --pidfile /var/run/dhcrelay.pid - eend $? -} diff --git a/net-misc/dhcp/files/dhcrelay.init2 b/net-misc/dhcp/files/dhcrelay.init2 deleted file mode 100755 index 4f09249a6782..000000000000 --- a/net-misc/dhcp/files/dhcrelay.init2 +++ /dev/null @@ -1,29 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init2,v 1.2 2011/03/08 20:13:26 vapier Exp $ - -depend() { - need net - use logger -} - -start() { - if [ -z "${DHCRELAY_SERVERS}" ]; then - eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/dhcrelay" - return 1 - fi - - checkpath -d /var/run/dhcp - - ebegin "Starting dhcrelay" - start-stop-daemon --start --exec /usr/sbin/dhcrelay \ - -- -q $(printf -- '-i %s ' ${IFACE}) ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} - eend $? -} - -stop() { - ebegin "Stopping dhcrelay" - start-stop-daemon --stop --pidfile /var/run/dhcp/dhcrelay.pid - eend $? -} |