summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kalika <max@gentoo.org>2003-11-05 22:52:40 +0000
committerMax Kalika <max@gentoo.org>2003-11-05 22:52:40 +0000
commit3281f190a9ca5a8fc9db4299b0d723ac56173f8c (patch)
tree8a7f7f4d9f99dd0b368edd11cd66b72b548b24b2 /net-misc
parentoops, whitespace fix (diff)
downloadgentoo-2-3281f190a9ca5a8fc9db4299b0d723ac56173f8c.tar.gz
gentoo-2-3281f190a9ca5a8fc9db4299b0d723ac56173f8c.tar.bz2
gentoo-2-3281f190a9ca5a8fc9db4299b0d723ac56173f8c.zip
Use a PID file for startup/shutdown.
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/ChangeLog6
-rw-r--r--net-misc/dhcp/Manifest6
-rw-r--r--net-misc/dhcp/dhcp-3.0_p2-r2.ebuild20
-rw-r--r--net-misc/dhcp/files/dhcp.rc67
4 files changed, 22 insertions, 17 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index 121c30a4c438..6d4895a6820f 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,10 @@
# 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.24 2003/10/24 17:42:37 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.25 2003/11/05 22:52:39 max Exp $
+
+ 05 Nov 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r2.ebuild,
+ files/dhcp.rc6:
+ Use a PID file for startup/shutdown.
24 Oct 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r2.ebuild:
Fix ownership as part of pkg_postinst(). Fixes bug 31840.
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 8d7b384b8880..545a4287c7ea 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,12 +1,12 @@
-MD5 2ae98a42186da590be753fe1215f3699 ChangeLog 4164
+MD5 bb94d544fe01f0784418d4070a8e7308 ChangeLog 4288
MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215
-MD5 825c2e9062f6a9da963410fe30c1b689 dhcp-3.0_p2-r2.ebuild 3583
+MD5 865d06459b5bc0ee9f900db047a51750 dhcp-3.0_p2-r2.ebuild 3702
MD5 c165af1e7e63275ca6f5974e2d3048a3 dhcp-3.0_p2.ebuild 2747
MD5 f374815f3e984f10b69982edb4319485 files/dhcp.conf 646
MD5 498a3eb0e9deaf705f17fff3834f5b90 files/dhclient.c-3.0-dw-cli-fix.patch 734
MD5 ff4bf18624d479599da15878fdef65fe files/conf.dhcpd 401
MD5 d6ae01f5dcc87b11d4d96a34e7cc52a3 files/digest-dhcp-3.0_p2 63
MD5 a941fa952582373e42b07b61bd66a168 files/digest-dhcp-3.0_p2-r2 129
-MD5 1efea8e54f4c6d6217a8949b4d15686d files/dhcp.rc6 1051
+MD5 a973319ed7e30b763485f653896ff038 files/dhcp.rc6 1097
MD5 be72fa691b23c9e82cc4567a1a035cfc files/dhcp.rc7 811
MD5 28ebabb4ad513afb04314634ecd9db25 files/dhcp-3.0pl2-user-option-fix.patch 1519
diff --git a/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild b/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild
index 30ae960c9076..006b7b4e61d2 100644
--- a/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild
+++ b/net-misc/dhcp/dhcp-3.0_p2-r2.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-r2.ebuild,v 1.4 2003/10/24 17:42:37 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild,v 1.5 2003/11/05 22:52:39 max Exp $
inherit eutils flag-o-matic
@@ -38,17 +38,19 @@ src_compile() {
cat <<-END >> includes/site.h
#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
- #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
+ #define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
#define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
+ #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
#define DHCPD_LOG_FACILITY LOG_LOCAL1
END
cat <<-END > site.conf
- CC = gcc ${CFLAGS}
+ CC = gcc
LIBDIR = /usr/lib
INCDIR = /usr/include
ETC = /etc/dhcp
VARDB = /var/lib/dhcp
+ VARRUN = /var/run/dhcp
ADMMANDIR = /usr/share/man/man8
FFMANDIR = /usr/share/man/man5
LIBMANDIR = /usr/share/man/man3
@@ -56,7 +58,7 @@ src_compile() {
END
./configure --with-nsupdate \
- --copts "-DPARANOIA -DEARLY_CHROOT" || die "configure failed"
+ --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" || die "configure failed"
emake || die "compile problem"
}
@@ -81,16 +83,14 @@ src_install() {
insinto /etc/conf.d
newins "${FILESDIR}/dhcp.conf" dhcp
-
exeinto /etc/init.d
newexe "${FILESDIR}/dhcp.rc6" dhcp
- keepdir /var/lib/dhcp
- fowners dhcp:dhcp /var/lib/dhcp
+ keepdir /var/{lib,run}/dhcp
}
pkg_postinst() {
- chown dhcp:dhcp /var/lib/dhcp
+ chown dhcp:dhcp "${ROOT}/var/lib/dhcp" "${ROOT}/var/run/dhcp"
einfo "You can edit /etc/conf.d/dhcp to customize dhcp settings"
einfo
@@ -108,10 +108,10 @@ pkg_config() {
if [ ! -d "${CHROOT:=/chroot/dhcp}" ] ; then
ebegin "Setting up the chroot directory"
- mkdir -m 0755 -p "${CHROOT}/etc" "${CHROOT}/var/lib"
+ mkdir -m 0755 -p "${CHROOT}/etc" "${CHROOT}/var/lib" "${CHROOT}/var/run"
cp -R /etc/dhcp "${CHROOT}/etc/"
cp -R /var/lib/dhcp "${CHROOT}/var/lib"
- chown -R dhcp:dhcp "${CHROOT}/var/lib"
+ chown -R dhcp:dhcp "${CHROOT}/var/lib" "${CHROOT}/var/lib"
eend
if [ "`grep '^#[[:blank:]]\?CHROOT' /etc/conf.d/dhcp`" ] ; then
diff --git a/net-misc/dhcp/files/dhcp.rc6 b/net-misc/dhcp/files/dhcp.rc6
index 13cf0da1c000..69114f65dc13 100644
--- a/net-misc/dhcp/files/dhcp.rc6
+++ b/net-misc/dhcp/files/dhcp.rc6
@@ -1,7 +1,7 @@
#!/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.6 2003/08/13 20:12:55 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.rc6,v 1.7 2003/11/05 22:52:39 max Exp $
depend() {
need net
@@ -30,13 +30,14 @@ start() {
ebegin "Starting ${CHROOT:+chrooted }dhcpd"
start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd \
- -- -user dhcp -group dhcp ${DHCPD_OPTS} \
+ -- -pf /var/run/dhcp/dhcpd.pid -q \
+ -user dhcp -group dhcp ${DHCPD_OPTS} \
${CHROOT:+-chroot ${CHROOT}} ${IFACE}
eend $?
}
stop() {
ebegin "Stopping dhcpd"
- start-stop-daemon --stop --quiet --exec /usr/sbin/dhcpd
+ start-stop-daemon --stop --quiet --pidfile /var/run/dhcp/dhcpd.pid
eend $?
}