summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kalika <max@gentoo.org>2003-08-13 20:12:58 +0000
committerMax Kalika <max@gentoo.org>2003-08-13 20:12:58 +0000
commita009c8055be88896c46912baf109968dc261f78c (patch)
tree631b62124b286d1085722f459d4269acb7820d11 /net-misc/dhcp
parentInitial commit. (diff)
downloadhistorical-a009c8055be88896c46912baf109968dc261f78c.tar.gz
historical-a009c8055be88896c46912baf109968dc261f78c.tar.bz2
historical-a009c8055be88896c46912baf109968dc261f78c.zip
Move dhcpd.leases file creation to the startup script. Change "use named" to "use dns". Other cleanups.
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r--net-misc/dhcp/ChangeLog7
-rw-r--r--net-misc/dhcp/Manifest12
-rw-r--r--net-misc/dhcp/dhcp-3.0_p2-r1.ebuild29
-rw-r--r--net-misc/dhcp/files/dhcp.rc631
4 files changed, 40 insertions, 39 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index e840dfe3f022..c660bee996b9 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/dhcp
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.18 2003/07/25 20:27:08 lanius Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.19 2003/08/13 20:12:55 max Exp $
+
+ 13 Aug 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r1.ebuild,
+ files/dhcp.rc6:
+ Move dhcpd.leases file creation to the startup script. Change "use named" to
+ "use dns". Other cleanups.
25 Jul 2003; lanius@gentoo.org files/dhcp.rc6, files/dhcp.rc7:
added "use named" to rc scripts (bug #25239)
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 50c42f8b1e91..ca6cb3355ab2 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,12 +1,12 @@
-MD5 1a5338e3e4a19d27bcc11902b63d4557 ChangeLog 3342
+MD5 6a8029dcd764461fd6d118545881c8a1 dhcp-3.0_p2-r1.ebuild 3415
MD5 aeb5f3de67ad8641b4431ce7dce6c032 dhcp-3.0_p1.ebuild 2519
-MD5 5aa0613e3216b73bf599da2d1ac467a7 dhcp-3.0_p2-r1.ebuild 3490
+MD5 7e3a50c856ed91e5e6e789154e360091 ChangeLog 3532
MD5 e796fd5f6453e7373690396ff143e77d dhcp-3.0_p2.ebuild 2740
-MD5 ff4bf18624d479599da15878fdef65fe files/conf.dhcpd 401
-MD5 498a3eb0e9deaf705f17fff3834f5b90 files/dhclient.c-3.0-dw-cli-fix.patch 734
MD5 f374815f3e984f10b69982edb4319485 files/dhcp.conf 646
-MD5 d1add720259cba29accf7bc775b27739 files/dhcp.rc6 800
-MD5 be72fa691b23c9e82cc4567a1a035cfc files/dhcp.rc7 811
+MD5 498a3eb0e9deaf705f17fff3834f5b90 files/dhclient.c-3.0-dw-cli-fix.patch 734
+MD5 ff4bf18624d479599da15878fdef65fe files/conf.dhcpd 401
MD5 4be1d9436727ac6b0c9e780b71f81fc9 files/digest-dhcp-3.0_p1 63
MD5 d6ae01f5dcc87b11d4d96a34e7cc52a3 files/digest-dhcp-3.0_p2 63
MD5 a941fa952582373e42b07b61bd66a168 files/digest-dhcp-3.0_p2-r1 129
+MD5 1efea8e54f4c6d6217a8949b4d15686d files/dhcp.rc6 1051
+MD5 be72fa691b23c9e82cc4567a1a035cfc files/dhcp.rc7 811
diff --git a/net-misc/dhcp/dhcp-3.0_p2-r1.ebuild b/net-misc/dhcp/dhcp-3.0_p2-r1.ebuild
index 77682711040a..ee0cd9f6f66c 100644
--- a/net-misc/dhcp/dhcp-3.0_p2-r1.ebuild
+++ b/net-misc/dhcp/dhcp-3.0_p2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2-r1.ebuild,v 1.1 2003/07/23 17:18:30 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2-r1.ebuild,v 1.2 2003/08/13 20:12:55 max Exp $
inherit flag-o-matic
@@ -8,8 +8,7 @@ IUSE=""
DESCRIPTION="ISC Dynamic Host Configuration Protocol."
HOMEPAGE="http://www.isc.org/products/DHCP"
-MY_P="${P/_p/pl}"
-SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P/_p/pl}.tar.gz
http://www.episec.com/people/edelkind/patches/dhcp/dhcp-3.0+paranoia.patch"
LICENSE="isc-dhcp"
@@ -17,23 +16,18 @@ SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc ~mips"
DEPEND="virtual/glibc
- sys-apps/groff"
+ >=sys-apps/sed-4"
-S="${WORKDIR}/${MY_P}"
+S="${WORKDIR}/${P/_p/pl}"
src_unpack() {
-
- unpack ${A}
-
- cd "${S}"
+ unpack ${A} && cd "${S}"
epatch "${FILESDIR}/dhclient.c-3.0-dw-cli-fix.patch"
epatch "${DISTDIR}/dhcp-3.0+paranoia.patch"
-
}
src_compile() {
-
# 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org>
if [ "${ARCH}" = "sparc" ] ; then
filter-flags "-O3"
@@ -64,11 +58,9 @@ src_compile() {
--copts "-DPARANOIA -DEARLY_CHROOT" || die "configure failed"
emake || die "compile problem"
-
}
src_install() {
-
enewgroup dhcp
enewuser dhcp -1 /bin/false /var/lib/dhcp dhcp
@@ -77,7 +69,8 @@ src_install() {
insinto /etc/dhcp
newins server/dhcpd.conf dhcpd.conf.sample
newins client/dhclient.conf dhclient.conf.sample
- dosed "s:/etc/dhclient-script:/etc/dhcp/dhclient-script:" /etc/dhcp/dhclient.conf.sample
+ dosed "s:/etc/dhclient-script:/etc/dhcp/dhclient-script:" \
+ /etc/dhcp/dhclient.conf.sample
mv "${D}/sbin/dhclient-script" "${D}/etc/dhcp/dhclient-script.sample"
dodoc ANONCVS CHANGES COPYRIGHT README RELNOTES doc/*
@@ -85,19 +78,16 @@ src_install() {
newdoc client/scripts/linux dhclient-script.sample
newdoc server/dhcpd.conf dhcpd.conf.sample
- touch "${D}/var/lib/dhcp/dhclient.leases"
- touch "${D}/var/lib/dhcp/dhcpd.leases"
-
insinto /etc/conf.d
newins "${FILESDIR}/dhcp.conf" dhcp
exeinto /etc/init.d
newexe "${FILESDIR}/dhcp.rc6" dhcp
+ keepdir /var/lib/dhcp
}
pkg_postinst() {
-
einfo "You can edit /etc/conf.d/dhcp to customize dhcp settings"
einfo
einfo "The DHCP ebuild now includes chroot support."
@@ -107,11 +97,9 @@ pkg_postinst() {
einfo "Before running the above command you might want to change the chroot"
einfo "dir in /etc/conf.d/dhcp, otherwise /chroot/dhcp will be used."
echo
-
}
pkg_config() {
-
CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/dhcp 2>/dev/null`
if [ ! -d "${CHROOT:=/chroot/dhcp}" ] ; then
@@ -130,5 +118,4 @@ pkg_config() {
eerror "${CHROOT} already exists. Quitting."
eerror
fi
-
}
diff --git a/net-misc/dhcp/files/dhcp.rc6 b/net-misc/dhcp/files/dhcp.rc6
index 5098cc057c3c..13cf0da1c000 100644
--- a/net-misc/dhcp/files/dhcp.rc6
+++ b/net-misc/dhcp/files/dhcp.rc6
@@ -1,12 +1,11 @@
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.rc6,v 1.5 2003/07/25 20:27:08 lanius Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.rc6,v 1.6 2003/08/13 20:12:55 max Exp $
depend() {
need net
- use logger
- use named
+ use logger dns
}
checkconfig() {
@@ -14,20 +13,30 @@ checkconfig() {
eerror "No ${CHROOT}/etc/dhcp/dhcpd.conf file exists!"
return 1
fi
+
+ if [ ! -f "${CHROOT}/var/lib/dhcp/dhcpd.leases" ] ; then
+ ebegin "Creating dhcpd.leases"
+ touch "${CHROOT}/var/lib/dhcp/dhcpd.leases" || return 1
+ eend $?
+ fi
+
+ ebegin "Setting ownership on dhcpd.leases"
+ chown dhcp:dhcp "${CHROOT}/var/lib/dhcp/dhcpd.leases" || return 1
+ eend $?
}
start() {
- checkconfig || return 1
+ checkconfig || return 1
- ebegin "Starting ${CHROOT:+chrooted }dhcpd"
- start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd \
- -- -user dhcp -group dhcp ${DHCPD_OPTS} \
+ ebegin "Starting ${CHROOT:+chrooted }dhcpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd \
+ -- -user dhcp -group dhcp ${DHCPD_OPTS} \
${CHROOT:+-chroot ${CHROOT}} ${IFACE}
- eend $?
+ eend $?
}
stop() {
- ebegin "Stopping dhcpd"
- start-stop-daemon --stop --quiet --exec /usr/sbin/dhcpd
- eend $?
+ ebegin "Stopping dhcpd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/dhcpd
+ eend $?
}