MD5 3f165a207e98ea92deb7ebfbbf4c2cf7 files/dhcpd.conf 1092
RMD160 936bb112c7cdf8e669b695599252d1f6626be2f3 files/dhcpd.conf 1092
SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5 files/dhcpd.conf 1092
-AUX dhcpd.init 2071 RMD160 05e493d00fb94814255d6f262bd8bdbe3f0af0a8 SHA1 8c794b9fe3bf07cf87e1ef90dc2e1b96f4e56786 SHA256 ce40811360f87baf6c608be23a9c0f9de5faa07021db9da5424f2f214bb5dfa4
-MD5 f2163f74f1d3467a579961d79a629b69 files/dhcpd.init 2071
-RMD160 05e493d00fb94814255d6f262bd8bdbe3f0af0a8 files/dhcpd.init 2071
-SHA256 ce40811360f87baf6c608be23a9c0f9de5faa07021db9da5424f2f214bb5dfa4 files/dhcpd.init 2071
+AUX dhcpd.init 1976 RMD160 b2bc8164ebeb315ea566ee8534fe15c7fffe8f62 SHA1 c95840e6ff878447a0cac8e8096f96ee93045eac SHA256 31f6674120c983f1d297e3c14586efbde55aa4bdf0e339f1c1dcf1bb0179a9f9
+MD5 514077d47d790afd7561e4040b7a9820 files/dhcpd.init 1976
+RMD160 b2bc8164ebeb315ea566ee8534fe15c7fffe8f62 files/dhcpd.init 1976
+SHA256 31f6674120c983f1d297e3c14586efbde55aa4bdf0e339f1c1dcf1bb0179a9f9 files/dhcpd.init 1976
AUX dhcrelay.conf 421 RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c SHA1 78ecdb000382893fb49d0052ced063955b0ad9cf SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730
MD5 db84514fe15fd7d81136afbaae738f55 files/dhcrelay.conf 421
RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c files/dhcrelay.conf 421
MD5 91749ab205c46ac726bcc8b75279e6de dhcp-3.0.3-r9.ebuild 7090
RMD160 39faccca29004357a6982530b476a58ef0724eac dhcp-3.0.3-r9.ebuild 7090
SHA256 a98505b8c62a03cb7e712b2f5fc1b7190f64314eb4a9bacdf5b45f373dc53aca dhcp-3.0.3-r9.ebuild 7090
+EBUILD dhcp-3.0.5-r1.ebuild 7453 RMD160 175a3cce8ed66e3c4575600c11fe88407bbdfe16 SHA1 c429ed3a7d935568b125771bfaa6dd3a0e930a23 SHA256 438f81e437f5051d215a83132a08db9f333f0516e0d7b138454a0e80b38c70e2
+MD5 413882c7b60e1aaeef33ed7e6ccb4ab8 dhcp-3.0.5-r1.ebuild 7453
+RMD160 175a3cce8ed66e3c4575600c11fe88407bbdfe16 dhcp-3.0.5-r1.ebuild 7453
+SHA256 438f81e437f5051d215a83132a08db9f333f0516e0d7b138454a0e80b38c70e2 dhcp-3.0.5-r1.ebuild 7453
EBUILD dhcp-3.0.5.ebuild 7450 RMD160 eec91623a55c4ec96c656ecf7929c1f04cc2e5f0 SHA1 3d5aae026bab18e813000d0cfe9d6f0e02a2b6fa SHA256 2a5f48c77a0f61f2312e83b6e4179d508a645d6f097f3724d79af7d5d082c690
MD5 f6b88e5f550f0c8ebc0e96a7d0ac8d21 dhcp-3.0.5.ebuild 7450
RMD160 eec91623a55c4ec96c656ecf7929c1f04cc2e5f0 dhcp-3.0.5.ebuild 7450
MD5 66d222e5100d4834035faedbaa768540 dhcp-3.1.0_alpha2.ebuild 7488
RMD160 180e7406863a20922f73f8273b1976f51efeeac3 dhcp-3.1.0_alpha2.ebuild 7488
SHA256 de65ac6cc9760efeb51dd830ab65cc126367708cdf3c6a2f2e4bac676c581d2d dhcp-3.1.0_alpha2.ebuild 7488
-MISC ChangeLog 21181 RMD160 215b7e5d7e31a009610d7cb1d59b86b33f96826b SHA1 d0a08ab160577c02a199f2c27984b5c57c587903 SHA256 a524baa62472bbc135e425994b650d1b0d648cdb14dbaf6d30b487892d9c5ca9
-MD5 1a83352e70de84335c24148f8b3af430 ChangeLog 21181
-RMD160 215b7e5d7e31a009610d7cb1d59b86b33f96826b ChangeLog 21181
-SHA256 a524baa62472bbc135e425994b650d1b0d648cdb14dbaf6d30b487892d9c5ca9 ChangeLog 21181
+MISC ChangeLog 21382 RMD160 91f3e23e32e49479853aa5b5a76444490542082f SHA1 ffe310782e7a5356bb9d450eb390b881e0d8051c SHA256 631e03f69a95b390fa3859e2ee8d6af44c6edb2bb1160acb3be10b88d4c3db0a
+MD5 1a40250ea79caecb4326930c3c9f71d4 ChangeLog 21382
+RMD160 91f3e23e32e49479853aa5b5a76444490542082f ChangeLog 21382
+SHA256 631e03f69a95b390fa3859e2ee8d6af44c6edb2bb1160acb3be10b88d4c3db0a ChangeLog 21382
MISC metadata.xml 441 RMD160 489c700355a49fda7d249a7b3f72066add57e779 SHA1 f2013226d45685a4bd06c3f7723df78e134486d4 SHA256 16dccfd59e8db49b0c9b9bb34f99188f9773a2ef00757d4fb429fea4293ac44e
MD5 3ccab43e194be4b8df2632546cbd028e metadata.xml 441
RMD160 489c700355a49fda7d249a7b3f72066add57e779 metadata.xml 441
MD5 baa5fba0594aaaf320323529af67db24 files/digest-dhcp-3.0.5 232
RMD160 412ca9be8de7ae69927b5914b742d8a3e367d7b2 files/digest-dhcp-3.0.5 232
SHA256 3dc56e680549f1bbbce372b339d5bf1d0474bfd8a45d950f5542bec89117606d files/digest-dhcp-3.0.5 232
+MD5 baa5fba0594aaaf320323529af67db24 files/digest-dhcp-3.0.5-r1 232
+RMD160 412ca9be8de7ae69927b5914b742d8a3e367d7b2 files/digest-dhcp-3.0.5-r1 232
+SHA256 3dc56e680549f1bbbce372b339d5bf1d0474bfd8a45d950f5542bec89117606d files/digest-dhcp-3.0.5-r1 232
MD5 633acdd0f53ac5b689ccf0d9876382d5 files/digest-dhcp-3.1.0_alpha2 238
RMD160 6f829c6a9788269b89e5909a83c8e806cd7b955a files/digest-dhcp-3.1.0_alpha2 238
SHA256 7d2825096cbc840a2559d57c682abc42d901d689a9f2333c46c6dcc180d4e59b files/digest-dhcp-3.1.0_alpha2 238
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.5-r1.ebuild,v 1.1 2007/03/10 20:21:39 uberlord Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV="${PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="doc minimal static selinux kernel_linux"
+
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ kernel_linux? ( sys-apps/net-tools )"
+
+PROVIDE="virtual/dhcpc"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Gentoo patches - these will probably never be accepted upstream
+ # Enable chroot support
+ epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch
+ # Fix some permission issues
+ epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-ntp.patch
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}"-3.0.3-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
+ # Enable eXtended options
+ epatch "${FILESDIR}/${PN}"-3.0.3-x-option.patch
+ # Add dbus support to dhclient
+ epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.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 -DEXTENDED_NEW_OPTION_INFO \
+ ${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
+
+ # Install our server files
+ if ! use minimal ; then
+ insinto /etc/dhcp
+ newins server/dhcpd.conf dhcpd.conf.sample
+ newinitd "${FILESDIR}"/dhcpd.init dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
+ insinto /etc/conf.d
+ newins "${FILESDIR}"/dhcpd.conf dhcpd
+ newins "${FILESDIR}"/dhcrelay.conf dhcrelay
+ fi
+}
+
+pkg_preinst() {
+ if ! use minimal ; then
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+ fi
+}
+
+pkg_postinst() {
+ use minimal && return
+
+ chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
+
+ if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+
+ einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
+ einfo
+ einfo "If you would like to run dhcpd in a chroot, simply configure the"
+ einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
+ einfo " emerge --config =${PF}"
+}
+
+pkg_config() {
+ 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"
+}
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.3 2006/05/11 14:58:34 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.4 2007/03/10 20:21:39 uberlord Exp $
DHCPD_CONF="/etc/dhcp/dhcpd.conf"
-# Work out our cffile if it's on our DHCPD_OPTS
-if [[ " ${DHCPD_OPTS} " == *" -cf "* ]]; then
- DHCPD_CONF=" ${DHCPD_OPTS} "
- DHCPD_CONF="${DHCPD_CONF##* -cf }"
- DHCPD_CONF="${DHCPD_CONF%% *}"
-
- # Now we have the cffile, we can remove it from our options
- DHCPD_OPTS="${DHCPD_OPTS//-cf/}"
- DHCPD_OPTS="${DHCPD_OPTS//${DHCPD_CONF}/}"
-fi
-
depend() {
need net
use logger dns
}
start() {
- if [[ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ]] ; then
+ # 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
local leasefile="$(get_var lease-file-name)"
leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}"
- if [[ ! -f ${leasefile} ]] ; then
+ if [ ! -f "${leasefile}" ] ; then
ebegin "Creating ${leasefile}"
touch "${leasefile}"
chown dhcp:dhcp "${leasefile}"
fi
# Setup LD_PRELOAD so name resolution works in our chroot.
- if [[ -n ${DHCPD_CHROOT} ]] ; then
+ if [ -n "${DHCPD_CHROOT}" ] ; then
LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so"
export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so"
fi
ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/dhcpd \
--pidfile "${DHCPD_CHROOT}/${pidfile}" \
- -- ${DHCPD_OPTS} -q -pf "${pidfile}" -cf "${DHCPD_CONF}" \
+ -- ${DHCPD_OPTS} -q -pf "${pidfile}" \
-user dhcp -group dhcp \
${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE}
eend $? \