Added dhcp until virtio bug fix is upstream

This commit is contained in:
Stefan Reimer 2012-10-03 16:56:49 -07:00
parent 5b2c767517
commit 66a74770e9
53 changed files with 7549 additions and 0 deletions

970
net-misc/dhcp/ChangeLog Normal file
View File

@ -0,0 +1,970 @@
# ChangeLog for net-misc/dhcp
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.217 2012/09/20 13:29:07 xarthisius Exp $
20 Sep 2012; Kacper Kowalik <xarthisius@gentoo.org> dhcp-4.2.4_p1.ebuild:
ppc64 stable wrt #428120
26 Aug 2012; Raúl Porcel <armin76@gentoo.org> dhcp-4.2.4_p1.ebuild:
alpha/s390/sh/sparc stable wrt #428120
09 Aug 2012; Brent Baude <ranger@gentoo.org> dhcp-4.2.4_p1.ebuild:
Marking dhcp-4.2.4_p1 ppc for bug 428120
02 Aug 2012; Markus Meier <maekke@gentoo.org> dhcp-4.2.4_p1.ebuild:
arm stable, bug #428120
26 Jul 2012; Jeroen Roovers <jer@gentoo.org> dhcp-4.2.4_p1.ebuild:
Stable for HPPA (bug #428120).
26 Jul 2012; Johannes Huber <johu@gentoo.org> dhcp-4.2.4_p1.ebuild:
Stable for x86, wrt bug #428120
26 Jul 2012; Richard Freeman <rich0@gentoo.org> dhcp-4.2.4_p1.ebuild:
amd64 stable - 428120
*dhcp-4.2.4_p1 (26 Jul 2012)
26 Jul 2012; Tony Vroon <chainsaw@gentoo.org> +dhcp-4.2.4_p1.ebuild:
Security upgrade addressing an IPv6-only buffer overflow (CVE-2012-3570),
remotely triggerable infinite loop (CVE-2012-3571) and remotely triggerable
memory leaks (CVE-2012-3954).
16 May 2012; Mike Frysinger <vapier@gentoo.org> files/dhcrelay.init3,
files/dhcrelay6.conf:
Drop use of IFACE for dhcrelay6 #415957#5 by Spooky Ghost.
*dhcp-4.2.3_p2 (16 May 2012)
16 May 2012; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.3_p2.ebuild,
+files/dhcrelay.init3, +files/dhcrelay6.conf:
Version bump, and add dhcrelay6 init.d support #415957 by Spooky Ghost.
28 Apr 2012; Alexis Ballier <aballier@gentoo.org> dhcp-4.2.3_p1.ebuild:
keyword ~amd64-fbsd
21 Mar 2012; Diego E. Pettenò <flameeyes@gentoo.org> dhcp-4.2.3_p1.ebuild:
Only depend on net-tools with client USE flag enabled (it's used by the
dhclient script).
01 Jan 2012; Raúl Porcel <armin76@gentoo.org> dhcp-4.2.3_p1.ebuild:
alpha/s390/sh/sparc stable wrt #393617
22 Dec 2011; Mark Loeser <halcy0n@gentoo.org> dhcp-4.2.3_p1.ebuild:
Stable for ppc/ppc64; bug #393617
14 Dec 2011; Markus Meier <maekke@gentoo.org> dhcp-4.2.3_p1.ebuild:
arm stable, bug #393617
14 Dec 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org> dhcp-4.2.3_p1.ebuild:
x86 stable wrt bug #393617
11 Dec 2011; Agostino Sarubbo <ago@gentoo.org> dhcp-4.2.3_p1.ebuild:
Stable for AMD64, wrt security bug #393617
09 Dec 2011; Jeroen Roovers <jer@gentoo.org> dhcp-4.2.3_p1.ebuild:
Stable for HPPA (bug #393617).
*dhcp-4.2.3_p1 (08 Dec 2011)
08 Dec 2011; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.3_p1.ebuild:
Version bump #393617 by Agostino Sarubbo.
*dhcp-4.2.2-r3 (04 Dec 2011)
04 Dec 2011; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.2-r3.ebuild,
+files/dhcpd.init5:
Enable --enable-early-chroot so config files can be per-chroot #388395 by
Touch. Fix up path to dhcprelay pid files #309129#2 by Milan Dadok.
11 Oct 2011; Jeroen Roovers <jer@gentoo.org> dhcp-4.2.2-r2.ebuild:
Stable for HPPA (bug #378799).
02 Oct 2011; Raúl Porcel <armin76@gentoo.org> dhcp-4.2.2-r2.ebuild:
alpha/arm/ia64/s390/sh/sparc stable wrt #378799
25 Sep 2011; Kacper Kowalik <xarthisius@gentoo.org> dhcp-4.2.2-r2.ebuild:
ppc/ppc64 stable wrt #378799
23 Sep 2011; Andreas Schuerch <nativemad@gentoo.org> dhcp-4.2.2-r2.ebuild:
x86 stable. Thanks Myckel SpanKY and all. bug 378799
23 Sep 2011; Mike Frysinger <vapier@gentoo.org> dhcp-4.2.2-r2.ebuild:
Install newer init.d script #383961 by Andreas Schürch.
22 Sep 2011; Mike Frysinger <vapier@gentoo.org> dhcp-4.2.2-r2.ebuild,
files/dhcpd.init4:
Install the default config files commented out since they aren't useful in
the real world other than as examples #384087 by Nick Bowler.
22 Sep 2011; Mike Frysinger <vapier@gentoo.org> dhcp-4.2.2-r2.ebuild:
Disable symtable support in local bind as it requires perl #383837 by Albert
W. Hopkins.
20 Sep 2011; Tony Vroon <chainsaw@gentoo.org> dhcp-4.2.2-r2.ebuild:
Marked stable on AMD64 based on explicit recommendation by Markos "hwoarang"
Chandras in #gentoo-amd64-dev.
19 Sep 2011; Markos Chandras <hwoarang@gentoo.org> dhcp-4.2.2-r1.ebuild:
Stable on amd64 wrt bug #378799
18 Sep 2011; Mike Frysinger <vapier@gentoo.org> dhcp-4.2.2-r2.ebuild,
files/dhcpd.conf2:
Drop old `emerge --config` comment #362535#9 by Petr Pisar.
*dhcp-4.2.2-r2 (17 Sep 2011)
17 Sep 2011; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.2-r2.ebuild,
+files/dhcpd.conf2, +files/dhcpd.init4:
Rewrite chroot usage to work with newer versions #362535 by Andrew Savchenko.
29 Aug 2011; Mike Frysinger <vapier@gentoo.org>
files/dhcp-4.2.2-bind-build-flags.patch:
Use BUILD_LIBS when creating build "gen" binary to fix cross-compiling cases
where the target uses libcap.
29 Aug 2011; Diego E. Pettenò <flameeyes@gentoo.org> dhcp-4.2.2-r1.ebuild:
Make sure the bind sub-build doesn't find libcap or it can rely on it for the
build process (disrupting cross-compilation). Also make the vim syntax
package a runtime dependency only, not a build-time one.
*dhcp-4.2.2-r1 (27 Aug 2011)
27 Aug 2011; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.2-r1.ebuild:
Fix up some bad paths to conf/run files #380829 by Agostino Sarubbo.
27 Aug 2011; Mike Frysinger <vapier@gentoo.org> dhcp-4.2.2.ebuild,
+files/dhcp-4.2.2-bind-build-flags.patch,
+files/dhcp-4.2.2-bind-disable.patch,
+files/dhcp-4.2.2-bind-parallel-build.patch:
Fix parallel build #380717 by Cédric Jeanneret, and clean up bind tweaks
with patches.
26 Aug 2011; Thomas Kahle <tomka@gentoo.org> dhcp-4.2.2.ebuild:
x86 stable per bug 378799
*dhcp-4.2.2 (26 Aug 2011)
26 Aug 2011; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.2.ebuild,
+files/dhcp-4.2.2-dhclient-resolvconf.patch,
+files/dhcp-4.2.2-dhclient-stdin-conf.patch,
+files/dhcp-4.2.2-nogateway.patch:
Version bump for security #378799, and fix cross-compiling.
01 May 2011; Kacper Kowalik <xarthisius@gentoo.org> dhcp-3.1.3_p1.ebuild:
ppc64 stable wrt #360047
25 Apr 2011; Raúl Porcel <armin76@gentoo.org> dhcp-3.1.3_p1.ebuild:
s390/sh/sparc stable wrt #360047
15 Apr 2011; Ulrich Mueller <ulm@gentoo.org> dhcp-3.1.2_p1.ebuild,
dhcp-3.1.3_p1.ebuild, dhcp-4.2.1_p1.ebuild:
Don't PROVIDE virtual/dhcpc, bug 358827.
11 Apr 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org> dhcp-3.1.3_p1.ebuild:
x86 stable wrt bug #360047
10 Apr 2011; Markus Meier <maekke@gentoo.org> dhcp-3.1.3_p1.ebuild:
arm stable, bug #360047
*dhcp-4.2.1_p1 (07 Apr 2011)
07 Apr 2011; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.1_p1.ebuild:
Version bump #362453 by Alex Legler.
01 Apr 2011; Jeroen Roovers <jer@gentoo.org> dhcp-3.1.3_p1.ebuild:
Stable for HPPA (bug #360047).
27 Mar 2011; Tobias Klausmann <klausman@gentoo.org> dhcp-3.1.3_p1.ebuild:
Stable on alpha, bug #360047
25 Mar 2011; Brent Baude <ranger@gentoo.org> dhcp-3.1.3_p1.ebuild:
Marking dhcp-3.1.3_p1 ppc for bug 360047
23 Mar 2011; Christoph Mende <angelos@gentoo.org> dhcp-3.1.3_p1.ebuild:
Stable on amd64 wrt bug #360047
*dhcp-4.2.1-r1 (23 Mar 2011)
23 Mar 2011; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.1-r1.ebuild,
metadata.xml:
Add USE=client/server flags.
08 Mar 2011; Mike Frysinger <vapier@gentoo.org> files/dhcrelay.init2:
Fix typo in dhcrelay init script #357935 by Milan Dadok.
*dhcp-4.2.1 (05 Mar 2011)
05 Mar 2011; Mike Frysinger <vapier@gentoo.org>
+files/dhcp-4.2.0-errwarn-message.patch, +dhcp-4.2.1.ebuild,
+files/dhcp-4.2.1-dhclient-resolvconf.patch,
+files/dhcp-4.2.1-nogateway.patch, +files/dhcpd.init3,
+files/dhcrelay.init2:
Version bump #309133 by Milan Dadok, #325605 by Stefan Behte, and #352897
by Paweł Hajdan, Jr. Add ldap support #160979 by Nico. Allow dhcp init.d
script to be multiplexed #238277 by Roy Marples. Respect nogateway option
by Laszlo Valko #265531 by Dmitry. Fix up chroot config checking by Lance
Albertson #278335 by Arthur Hagen. Include full DHCPD_OPTS when checking
the config #283352 by Marc. Update path to dhcrelay.pid #309129 by Milan
Dadok.
*dhcp-3.1.3_p1 (15 Oct 2010)
15 Oct 2010; Robin H. Johnson <robbat2@gentoo.org> +dhcp-3.1.3_p1.ebuild:
Upstream final 3.1 release: 3.1-ESV. In Gentoo as 3.1.3_p1 since we need
it to come after 3.1.3.
*dhcp-3.1.3 (15 Oct 2010)
15 Oct 2010; Robin H. Johnson <robbat2@gentoo.org> +dhcp-3.1.3.ebuild,
+files/dhcp-3.1.3-dhclient-no-down.patch:
Bug #324671: Add dhcpd-3.1.3
15 Jan 2010; Ulrich Mueller <ulm@gentoo.org> dhcp-3.1.1.ebuild,
dhcp-3.1.1-r1.ebuild, dhcp-3.1.2.ebuild, dhcp-3.1.2_p1.ebuild,
dhcp-4.0.1.ebuild, dhcp-4.1.0.ebuild:
Fix LICENSE, bug 301123.
26 Jul 2009; Brent Baude <ranger@gentoo.org> dhcp-3.1.2_p1.ebuild:
Marking dhcp-3.1.2_p1 ppc64 for bug 275231
22 Jul 2009; Raúl Porcel <armin76@gentoo.org> dhcp-3.1.2_p1.ebuild:
arm/s390/sh/sparc stable wrt #275231
19 Jul 2009; nixnut <nixnut@gentoo.org> dhcp-3.1.2_p1.ebuild:
ppc stable #275231
19 Jul 2009; Tobias Klausmann <klausman@gentoo.org> dhcp-3.1.2_p1.ebuild:
Stable on alpha, bug #275231
17 Jul 2009; Jeroen Roovers <jer@gentoo.org> dhcp-3.1.2_p1.ebuild:
Stable for HPPA (bug #275231).
16 Jul 2009; Christian Faulhammer <fauli@gentoo.org> dhcp-3.1.2_p1.ebuild:
stable x86, security bug 275231
16 Jul 2009; <chainsaw@gentoo.org> dhcp-3.1.2_p1.ebuild:
Marked stable on AMD64 for security bug #275231; tested on a dual
dual-core Opteron 2220 system with ~15 clients spread over two subnets.
*dhcp-3.1.2_p1 (14 Jul 2009)
14 Jul 2009; Robert Buchholz <rbu@gentoo.org>
+files/dhcp-3.1.2_p1-CVE-2009-1892.patch, +dhcp-3.1.2_p1.ebuild:
Add new upstream version with the official fix for CVE-2009-0692, fix
DoS issue in dhcpd (CVE-2009-1892), bug #275231.
*dhcp-3.1.1-r1 (14 Jul 2009)
14 Jul 2009; <chainsaw@gentoo.org> +dhcp-3.1.1-r1.ebuild,
+files/dhcp-3.1.1-CVE-2009-0692.patch:
Version bump for CVE-2009-0692 (dhclient stack-based buffer overflow);
security bug #277729. Stable keywords approved by arch liaisons.
*dhcp-4.1.0 (09 Jul 2009)
*dhcp-3.1.2 (09 Jul 2009)
09 Jul 2009; <chainsaw@gentoo.org> +dhcp-3.1.2.ebuild, +dhcp-4.1.0.ebuild,
+files/dhcp-4.1-dhclient-metric.patch, +files/dhcp-4.1-no_isc_blurb.patch,
+files/dhcpd.init2:
Version bump to 3.1.2 & 4.1.0 upstream releases, as requested in bug
#264809. Create /var/lib/dhclient as per bug #222261. Recursive chown to
dhcp:dhcp closes bug #236671. Test config in init-script, apache-style by
Arturas from Lithuania in bug #259364. Paranoia/chroot support now
upstream in 4.1, dropped patch.
29 May 2009; Mike Frysinger <vapier@gentoo.org> -dhcp-3.0.3-r9.ebuild,
-dhcp-3.0.6.ebuild, -dhcp-3.1.0.ebuild:
Punt old packages vuln to GLSA 200808-05 #271748.
*dhcp-4.0.1 (30 Mar 2009)
30 Mar 2009; <chainsaw@gentoo.org>
+files/dhcp-4.0.1-dhclient-stdin-conf.patch, -dhcp-4.0.0.ebuild,
+dhcp-4.0.1.ebuild:
Version bump to 4.0.1, stdin config support for dhclient has been rediffed
due to upstream changes. Still masked, deleting old ebuild.
26 Oct 2008; Mike Frysinger <vapier@gentoo.org> dhcp-4.0.0.ebuild:
Pull in app-vim/dhcpd-syntax with USE=vim-syntax #240192 by Dan Wallis.
*dhcp-4.0.0 (04 Sep 2008)
04 Sep 2008; <chainsaw@gentoo.org> +files/dhcp-4.0-dhclient-metric.patch,
+files/dhcp-4.0-dhclient-ntp.patch,
+files/dhcp-4.0-dhclient-resolvconf.patch,
+files/dhcp-4.0-dhclient-script-correct-operators.patch,
+files/dhcp-4.0-dhclient-stdin-conf.patch,
+files/dhcp-4.0-linux-ipv6-header.patch,
+files/dhcp-4.0-no_isc_blurb.patch, +files/dhcp-4.0-paranoia.patch,
+dhcp-4.0.0.ebuild:
Version bump, closes bug #205214. Thanks to Roy "UberLord" Marples
<roy@marples.name> for patching and patch porting.
29 Jun 2008; Tobias Klausmann <klausman@gentoo.org> dhcp-3.1.1.ebuild:
Stable on alpha, bug #227135
29 Jun 2008; Friedrich Oslage <bluebird@gentoo.org> dhcp-3.1.1.ebuild:
Stable on sparc, bug #227135
28 Jun 2008; Jeroen Roovers <jer@gentoo.org> dhcp-3.1.1.ebuild:
Stable for HPPA (bug #227135).
28 Jun 2008; Markus Meier <maekke@gentoo.org> dhcp-3.1.1.ebuild:
x86 stable, bug #227135
27 Jun 2008; Brent Baude <ranger@gentoo.org> dhcp-3.1.1.ebuild:
Marking dhcp-3.1.1 ppc for bug 227135
27 Jun 2008; Brent Baude <ranger@gentoo.org> dhcp-3.1.1.ebuild:
Marking dhcp-3.1.1 ppc64 for bug 227135
27 Jun 2008; <chainsaw@gentoo.org> dhcp-3.1.1.ebuild:
Mark stable on AMD64 for security bug #227135. Tested on Core2 Duo &
Opteron 2218.
*dhcp-3.1.1 (27 Jun 2008)
27 Jun 2008; <chainsaw@gentoo.org> +dhcp-3.1.1.ebuild:
Version bump for bug #227135.
29 Mar 2008; Mike Frysinger <vapier@gentoo.org>
files/dhcp-3.0.3-dhclient-ntp.patch,
files/dhcp-3.0.3-dhclient-resolvconf.patch,
files/dhcp-3.1.0a1-dhclient-resolvconf.patch:
Convert `echo -e` to `printf` #208558 by Davide Pesavento.
25 Dec 2007; Christian Heim <phreak@gentoo.org> metadata.xml:
Removing uberlord from metadata.xml as per #199318.
01 Oct 2007; Raúl Porcel <armin76@gentoo.org> dhcp-3.0.6.ebuild,
dhcp-3.1.0.ebuild:
sparc stable wrt #190775
09 Sep 2007; Roy Marples <uberlord@gentoo.org> dhcp-3.1.0.ebuild:
Stop installing a blank dhcpd.leases file, #191748 thanks to Kevin Pyle.
08 Sep 2007; Joseph Jezak <josejx@gentoo.org> dhcp-3.0.6.ebuild,
dhcp-3.1.0.ebuild:
Marked ppc/ppc64 stable for bug #190775.
06 Sep 2007; Roy Marples <uberlord@gentoo.org>
-files/dhcp-3.1.0a1-x-option.patch, dhcp-3.1.0.ebuild:
Drop the extended option patch for 3.1.0 as we stopped using it.
02 Sep 2007; Joshua Kinard <kumba@gentoo.org> dhcp-3.0.6.ebuild,
dhcp-3.1.0.ebuild:
Stable on mips, per 190775.
02 Sep 2007; Christoph Mende <angelos@gentoo.org> dhcp-3.0.6.ebuild,
dhcp-3.1.0.ebuild:
Stable on amd64 wrt bug #190775
02 Sep 2007; Raúl Porcel <armin76@gentoo.org> dhcp-3.0.6.ebuild,
dhcp-3.1.0.ebuild:
alpha stable wrt #190775, thanks to Tobias Klausmann for testing
30 Aug 2007; Jurek Bartuszek <jurek@gentoo.org> dhcp-3.0.6.ebuild,
dhcp-3.1.0.ebuild:
x86 stable (bug #190775)
30 Aug 2007; Jeroen Roovers <jer@gentoo.org> dhcp-3.0.6.ebuild,
dhcp-3.1.0.ebuild:
Stable for HPPA (bug #190775).
*dhcp-3.1.0 (20 Jul 2007)
20 Jul 2007; Roy Marples <uberlord@gentoo.org> +dhcp-3.1.0.ebuild:
Bumpage.
*dhcp-3.1.0_rc2 (19 Jul 2007)
19 Jul 2007; Roy Marples <uberlord@gentoo.org> +dhcp-3.1.0_rc2.ebuild:
New upstream rc. May not work with NetworkManager as dhclient now has it's
own -x option which conflicts with one of the patches.
19 Jul 2007; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0-ddns-example.patch, dhcp-3.0.3-r9.ebuild,
dhcp-3.0.6.ebuild:
Add 'ddns-update-style ad-hoc;' to the example dhcpd.conf file, #170311
thanks to Whit Blauvelt.
*dhcp-3.0.6 (05 Jul 2007)
05 Jul 2007; Roy Marples <uberlord@gentoo.org> +dhcp-3.0.6.ebuild:
Bump
*dhcp-3.1.0_alpha3 (26 Apr 2007)
26 Apr 2007; Roy Marples <uberlord@gentoo.org> +dhcp-3.1.0_alpha3.ebuild:
Bump, #176137 thanks to Attila Jecs.
22 Apr 2007; Roy Marples <uberlord@gentoo.org> dhcp-3.0.3-r9.ebuild,
dhcp-3.0.5.ebuild, dhcp-3.0.5-r1.ebuild, dhcp-3.1.0_alpha2.ebuild:
newins -> newconfd, #174266.
22 Mar 2007; Roy Marples <uberlord@gentoo.org> files/dhcrelay.init:
Remove bashisms from dhcrelay script, #171766 thanks to Natanael Copa.
*dhcp-3.0.5-r1 (10 Mar 2007)
10 Mar 2007; Roy Marples <uberlord@gentoo.org> files/dhcpd.init,
+dhcp-3.0.5-r1.ebuild:
Bump for a non bash init script for dhcpd, #170084 thanks to Natanael Copa.
20 Dec 2006; Roy Marples <uberlord@gentoo.org> dhcp-3.0.5.ebuild,
dhcp-3.1.0_alpha2.ebuild:
Stop dhclient-script forcing bash, #158540 thanks to Nick Fortune.
*dhcp-3.1.0_alpha2 (13 Dec 2006)
13 Dec 2006; Roy Marples <uberlord@gentoo.org> +dhcp-3.1.0_alpha2.ebuild:
New upstream alpha.
*dhcp-3.0.5 (06 Nov 2006)
06 Nov 2006; Roy Marples <uberlord@gentoo.org> +dhcp-3.0.5.ebuild:
New upstream version.
17 Oct 2006; Roy Marples <uberlord@gentoo.org> dhcp-3.0.5_rc2.ebuild,
dhcp-3.1.0_alpha1.ebuild:
Added ~sparc-fbsd keyword.
20 Sep 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.5-bpf-nofallback.patch, dhcp-3.0.5_rc2.ebuild,
dhcp-3.1.0_alpha1.ebuild:
Add a patch to stop using a fallback interface when using BPF.
This allows >1 instance of dhclient to run on BSD.
13 Sep 2006; Roy Marples <uberlord@gentoo.org> dhcp-3.0.4-r2.ebuild,
dhcp-3.0.5_rc2.ebuild, dhcp-3.1.0_alpha1.ebuild:
Quiet the freebsd logger a little
08 Sep 2006; Roy Marples <uberlord@gentoo.org> files/dhcrelay.conf:
dhcrelay should be configured for all interfaces used for listening and
sending, not just listening. Thanks to rmh3093 in the forums.
*dhcp-3.1.0_alpha1 (07 Sep 2006)
07 Sep 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.1.0a1-dhclient-resolvconf.patch,
+files/dhcp-3.1.0a1-x-option.patch, +dhcp-3.1.0_alpha1.ebuild:
New alpha version. Has FQDN support, wooooo.
06 Sep 2006; Roy Marples <uberlord@gentoo.org> dhcp-3.0.5_rc2.ebuild:
Just warn about Packet Socket instead of requiring linux sources
05 Sep 2006; Roy Marples <uberlord@gentoo.org> dhcp-3.0.5_rc2.ebuild:
dhcp requires CONFIG_PACKET to work in linux.
*dhcp-3.0.5_rc2 (03 Sep 2006)
03 Sep 2006; Roy Marples <uberlord@gentoo.org>
+dhcp-3.0.5_rc2.ebuild:
Version bump.
11 Aug 2006; Thomas Cort <tcort@gentoo.org> dhcp-3.0.3-r9.ebuild:
Stable on alpha wrt Bug #137689.
*dhcp-3.0.5_beta1 (27 Jul 2006)
27 Jul 2006; Roy Marples <uberlord@gentoo.org>
files/dhcp-3.0.3-dhclient-hostname.patch, +dhcp-3.0.5_beta1.ebuild:
Version bump and fix hostname patch slightly.
09 Jul 2006; Joshua Kinard <kumba@gentoo.org> dhcp-3.0.3-r9.ebuild:
Marked stable on mips.
02 Jul 2006; Chris White <chriswhite@gentoo.org> metadata.xml:
Japanese metadata.xml translation. Thanks to Yoshino-san in bug #134840.
*dhcp-3.0.4-r2 (28 Jun 2006)
28 Jun 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.4-64bit.patch, +dhcp-3.0.4-r2.ebuild:
Added patch to fix 64 bit DHCP servers, #133905.
25 Jun 2006; Marcus D. Hanwell <cryos@gentoo.org> dhcp-3.0.3-r9.ebuild:
Marked stable on amd64. bug 137689.
25 Jun 2006; Guy Martin <gmsoft@gentoo.org> dhcp-3.0.3-r9.ebuild:
Stable on hppa.
25 Jun 2006; Tobias Scherbaum <dertobi123@gentoo.org>
dhcp-3.0.3-r9.ebuild:
ppc stable, bug #137689
23 Jun 2006; Markus Rothe <corsair@gentoo.org> dhcp-3.0.3-r9.ebuild:
Stable on ppc64; bug #137689
23 Jun 2006; Chris Gianelloni <wolf31o2@gentoo.org> dhcp-3.0.3-r9.ebuild:
Stable on x86 wrt bug #137689.
23 Jun 2006; Gustavo Zacarias <gustavoz@gentoo.org> dhcp-3.0.3-r9.ebuild:
Stable on sparc wrt #137689
09 Jun 2006; <roy@gentoo.org> -dhcp-3.0.4.ebuild, dhcp-3.0.3-r9.ebuild,
dhcp-3.0.4-r1.ebuild:
minimal USE flag stops the building of the DHCP server
doc USE flag installs the documentation
*dhcp-3.0.3-r9 (23 May 2006)
23 May 2006; Roy Marples <uberlord@gentoo.org>
files/dhcp-3.0.3-dhclient-resolvconf.patch, +dhcp-3.0.3-r9.ebuild:
dhclient-script now works with invalid, RFC violating but sometimes used
space seperated domain names, #134101 thanks to Jan Spitalnik.
*dhcp-3.0.3-r8 (23 May 2006)
23 May 2006; Roy Marples <uberlord@gentoo.org> +dhcp-3.0.3-r8.ebuild:
As 3.0.4 is a bust for 64-bit servers, push fixes downto 3.0.3-r8.
*dhcp-3.0.4-r1 (11 May 2006)
11 May 2006; Roy Marples <uberlord@gentoo.org> files/dhcpd.conf,
files/dhcpd.init, +dhcp-3.0.4-r1.ebuild:
Fixed typo in conf.d/dhcpd and fixed chroot pidfile, #133019 thanks to Hod.
10 May 2006; Roy Marples <uberlord@gentoo.org>
files/dhcp-3.0.3-dhclient-metric.patch,
files/dhcp-3.0.3-dhclient-no-down.patch:
Tweak patches so that IF_METRIC is applied to the subnet route too.
09 May 2006; Roy Marples <uberlord@gentoo.org> dhcp-3.0.4.ebuild:
Correct location for default dhclient conf and pid files.
*dhcp-3.0.4 (05 May 2006)
05 May 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.4-dhclient-stdin-conf.patch, +dhcp-3.0.4.ebuild:
New upstream release.
*dhcp-3.0.4_rc1 (21 Apr 2006)
*dhcp-3.0.3-r7 (21 Apr 2006)
21 Apr 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.3-dhclient-dbus.patch, +files/dhcp-3.0.3-x-option.patch,
+dhcp-3.0.3-r7.ebuild, +dhcp-3.0.4_rc1.ebuild:
New patches for dbus and eXtended option environment support
which should allow us to be used by NetworkManager.
20 Apr 2006; Roy Marples <uberlord@gentoo.org>
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-no-down.patch, dhcp-3.0.3-r6.ebuild,
dhcp-3.0.4_beta3-r1.ebuild:
metric patch now applies to ifconfig on all OS's apart from Linux.
Split no down interface into seperate patch.
Make SEDMANPAGES instead of CATMANPAGES, #130251.
14 Apr 2006; Diego Pettenò <flameeyes@gentoo.org> dhcp-3.0.3-r6.ebuild,
dhcp-3.0.4_beta3-r1.ebuild:
Confirm man installation names and category, so that the installed copies on
non-Linux are the same as the ones on Linux.
31 Mar 2006; Diego Pettenò <flameeyes@gentoo.org> dhcp-3.0.3-r6.ebuild:
Add ~x86-fbsd keyword.
22 Mar 2006; Roy Marples <uberlord@gentoo.org>
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-dhclient-resolvconf.patch, dhcp-3.0.3-r6.ebuild,
dhcp-3.0.4_beta3-r1.ebuild:
Tweaked patchset to apply cleanly.
Support PEER_DNS and PEER_NTP options.
21 Mar 2006; Diego Pettenò <flameeyes@gentoo.org> dhcp-3.0.3-r6.ebuild,
dhcp-3.0.4_beta3-r1.ebuild:
Make net-tools a dependency only for linux kernel.
21 Mar 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.3-dhclient-hostname.patch,
files/dhcp-3.0.3-dhclient-metric.patch,
+files/dhcp-3.0.3-dhclient-mtu.patch, dhcp-3.0.3-r6.ebuild,
dhcp-3.0.4_beta3-r1.ebuild:
Added token ring patch back to 3.0.3-r6, #126971
Fixed setting hostname on Linux kernels where it reports (none).
dhclient-script now supports interface mtu option.
*dhcp-3.0.4_beta3-r1 (20 Mar 2006)
*dhcp-3.0.3-r6 (20 Mar 2006)
20 Mar 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.3-dhclient-metric.patch,
files/dhcp-3.0.3-dhclient-ntp.patch,
+files/dhcp-3.0.3-dhclient-resolvconf.patch, +dhcp-3.0.3-r6.ebuild,
+dhcp-3.0.4_beta3-r1.ebuild:
dhclient-script now supports resolvconf, creates ntp.conf files and uses the
env variable IF_METRIC to set a metric on default routes.
*dhcp-3.0.4_beta3 (28 Feb 2006)
28 Feb 2006; Roy Marples <uberlord@gentoo.org> +files/dhcpd.conf,
+files/dhcpd.init, +dhcp-3.0.4_beta3.ebuild:
Version bump.
3.0.4_beta3 has had the init script and config renamed to dhcpd.
The config file has also changed slightly and the new init script can now be
fully multiplexed as a result.
You *have* to remove the old dhcp init script.
*dhcp-3.0.4_beta2-r2 (24 Feb 2006)
*dhcp-3.0.3-r5 (24 Feb 2006)
24 Feb 2006; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.3-dhclient-stdin-conf.patch,
+files/dhcp-3.0.4_beta2-dhclient-stdin-conf.patch, +dhcp-3.0.3-r5.ebuild,
+dhcp-3.0.4_beta2-r2.ebuild:
Added a patch to dhclient so it can read extra config from stdin.
Users won't use this, but baselayout-1.12.0_pre17 will.
*dhcp-3.0.3-r4 (23 Feb 2006)
23 Feb 2006; Roy Marples <uberlord@gentoo.org> files/dhcp.init,
+dhcp-3.0.3-r4.ebuild:
Bump for a new init script that fixes non chroots, #123813.
*dhcp-3.0.3-r3 (23 Feb 2006)
23 Feb 2006; Roy Marples <uberlord@gentoo.org> files/dhcp.init,
+dhcp-3.0.3-r3.ebuild:
Bump for new init script which fixes CHROOT handling, #122805.
18 Feb 2006; Simon Stelling <blubb@gentoo.org> ChangeLog:
stable on amd64
17 Feb 2006; Markus Rothe <corsair@gentoo.org> dhcp-3.0.3-r2.ebuild:
Stable on ppc64; bug #89424
17 Feb 2006; Joseph Jezak <josejx@gentoo.org> dhcp-3.0.3-r2.ebuild:
Marked ppc stable for bug #89424.
09 Feb 2006; Gustavo Zacarias <gustavoz@gentoo.org> dhcp-3.0.3-r2.ebuild:
Stable on sparc wrt #89424
09 Feb 2006; Joshua Kinard <kumba@gentoo.org> dhcp-3.0.3-r2.ebuild:
Marked stable on mips.
08 Feb 2006; Mark Loeser <halcy0n@gentoo.org> dhcp-3.0.3-r2.ebuild:
Stable on x86; bug #89424
07 Feb 2006; Aron Griffis <agriffis@gentoo.org> dhcp-3.0.3-r2.ebuild:
Mark 3.0.3-r2 stable on alpha
28 Dec 2005; Guy Martin <gmsoft@gentoo.org> dhcp-3.0.3-r2.ebuild:
No more unaligned access on hppa. Marking stable.
22 Dec 2005; Roy Marples <uberlord@gentoo.org> dhcp-3.0.4_beta2-r1.ebuild:
Remove script, host-name and domain-name options from the sample dhclient.conf
21 Dec 2005; Roy Marples <uberlord@gentoo.org> dhcp-3.0.1-r1.ebuild,
dhcp-3.0.3-r2.ebuild, dhcp-3.0.4_beta2-r1.ebuild:
Updated post merge message to use emerge --config, #109482.
*dhcp-3.0.4_beta2-r1 (14 Dec 2005)
*dhcp-3.0.3-r2 (14 Dec 2005)
14 Dec 2005; Roy Marples <uberlord@gentoo.org> files/dhcp.init,
-dhcp-3.0.3-r1.ebuild, +dhcp-3.0.3-r2.ebuild, -dhcp-3.0.4_beta2.ebuild,
+dhcp-3.0.4_beta2-r1.ebuild:
Fixed correct owner of lease file, #115554 thanks to Jan Spitalnik.
*dhcp-3.0.4_beta2 (09 Dec 2005)
09 Dec 2005; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.3-no_isc_blurb.patch, +dhcp-3.0.4_beta2.ebuild:
New upstream beta release, fixes #101891.
Dropped token ring patch as a better fix has been made upstream.
Added patch to quiet the isc blurb if the -q option is given.
(patch nobbled from RedHat and adapted by me for dhclient and dhcrelay)
Install Japanese documentation if ja is in LINGUAS and en isn't.
Tart up the installed dhclient-script to add a comment saying
that they aren't used when using Gentoo baselayout net scripts.
Branded the binaries with Gentoo revision.
09 Dec 2005; Roy Marples <uberlord@gentoo.org> dhcp-3.0.3-r1.ebuild:
multilib fixed.
07 Dec 2005; Roy Marples <uberlord@gentoo.org> dhcp-3.0.3-r1.ebuild:
Fixed sandbox violation, #114753.
*dhcp-3.0.3-r1 (07 Dec 2005)
07 Dec 2005; Roy Marples <uberlord@gentoo.org>
+files/dhcp-3.0.3-libdst.patch, +files/dhcp-3.0-fix-perms.patch,
+files/dhcp-3.0-paranoia.patch, files/dhcp.conf, +files/dhcp.init,
files/dhcrelay.conf, +files/dhcrelay.init, metadata.xml,
-dhcp-3.0.2.ebuild, -dhcp-3.0.3.ebuild, +dhcp-3.0.3-r1.ebuild:
Split patches out into FILESDIR.
Stop installing dhclient-script.sample as baselayout has its own.
chroot creation no longer assumes a default directory.
We copy resolv.conf and localtime as a real files into the chroot now.
document resolv.conf in conf.d/dhcp for chroots, #113869.
init script now parses dhcpd.conf for pidfile and leasefile locations, #89428.
libdst.a gets installed now, #75544 thanks to Ron O'Hara.
04 Dec 2005; Tom Gall <tgall@gentoo.org> dhcp-3.0.1-r1.ebuild:
stable on ppc64
*dhcp-3.0.3 (12 Oct 2005)
12 Oct 2005; Roy Marples <uberlord@gentoo.org> +files/dhcp-3.0.3-tr.patch,
+files/dhclient-ntp.patch, +dhcp-3.0.3.ebuild:
Version bump
Includes fixes for #102473 (tr.c not compiling, patch by Ed Catmur)
and dhclient ntp support #63868
15 Sep 2005; Aron Griffis <agriffis@gentoo.org> dhcp-3.0.1-r1.ebuild:
Mark 3.0.1-r1 stable on alpha
04 Sep 2005; Diego Pettenò <flameeyes@gentoo.org>
+files/dhcp-3.0.2-gmake.patch, dhcp-3.0.2.ebuild:
Added patch to fix wrong 'make' calls on Gentoo/FreeBSD.
04 Sep 2005; Diego Pettenò <flameeyes@gentoo.org> dhcp-3.0.2.ebuild:
Remove -Werror cflag that is passed when building on FreeBSD to fix
Gentoo/FreeBSD.
17 Jun 2005; Michael Hanselmann <hansmi@gentoo.org> dhcp-3.0.1-r1.ebuild:
Stable on ppc.
20 May 2005; Rene Nussbaumer <killerfox@gentoo.org> dhcp-3.0.1-r1.ebuild:
Stable on hppa
19 May 2005; Gustavo Zacarias <gustavoz@gentoo.org> dhcp-3.0.1-r1.ebuild:
Stable on sparc
17 May 2005; Jan Brinkmann <luckyduck@gentoo.org> dhcp-3.0.1-r1.ebuild:
stable on amd64
*dhcp-3.0.2 (16 May 2005)
16 May 2005; Seemant Kulleen <seemant@gentoo.org>
-files/dhcp-3.0.1-fix-invalid-attribute.patch,
-files/dhcp-3.0+paranoia.patch, -files/dhcp-3.0pl2-fix-perms.patch,
dhcp-3.0.1.ebuild, dhcp-3.0.1-r1.ebuild, +dhcp-3.0.2.ebuild:
Version bump thanks to: Bjarke Istrup Pedersen <Bjarke.ip@tekpunkt.dk> in
bug #88630. Additionally, moved the patches to a tarball on the mirrors.
Configs will probably follow
29 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> :
Change encoding to UTF-8 for GLEP 31 compliance
20 Dec 2004; <max@gentoo.org> files/dhcrelay.conf, files/dhcrelay.rc6:
Fix dhcrelay startup script for proper commandline arguments and proper
shutdown pidfile. Fixes bug #48207.
*dhcp-3.0.1-r1 (20 Dec 2004)
20 Dec 2004; <max@gentoo.org> -files/conf.dhcpd, files/dhcp.conf,
files/dhcp.rc6, +dhcp-3.0.1-r1.ebuild:
Removed unused conf.dhcpd file. Move the -q option out of rc6 script into
conf.d file for easier debugging. Add localtime to the chroot setup. Add
commented LD_PRELOAD variable for proper name resoluting inside chroot. Fixes
bug #41217.
10 Nov 2004; Travis Tilley <lv@gentoo.org>
+files/dhcp-3.0.1-fix-invalid-attribute.patch, dhcp-3.0.1.ebuild:
fixed some invalid attributes in includes/dhcpd.h so that dhcp compiles
using gcc 3.4 again. closes bug 69555
17 Oct 2004; Dylan Carlson <absinthe@gentoo.org> dhcp-3.0.1.ebuild:
keywords ~amd64.
02 Oct 2004; Bryan Østergaard <kloeri@gentoo.org> dhcp-3.0.1.ebuild:
Keyword ~alpha, bug 65840.
07 Sep 2004; Gustavo Zacarias <gustavoz@gentoo.org> dhcp-3.0.1.ebuild:
Stable on sparc
*dhcp-3.0.1 (18 Jul 2004)
18 Jul 2004; Mike Frysinger <vapier@gentoo.org>
+files/dhcp-3.0+paranoia.patch, +dhcp-3.0.1.ebuild, dhcp-3.0_p2-r5.ebuild,
dhcp-3.0_p2-r6.ebuild:
Version bump #57347 by Martin Jackson. Also move paranoia patch out of
$DISTDIR and into $FILESDIR.
01 Jul 2004; Jon Hood <squinky86@gentoo.org> dhcp-3.0_p2-r4.ebuild,
dhcp-3.0_p2-r5.ebuild, dhcp-3.0_p2-r6.ebuild:
change virtual/glibc to virtual/libc
27 Apr 2004; Aron Griffis <agriffis@gentoo.org> dhcp-3.0_p2-r4.ebuild:
Add inherit eutils
06 Apr 2004; Joshua Brindle <method@gentoo.org> dhcp-3.0_p2-r4.ebuild,
dhcp-3.0_p2-r5.ebuild, dhcp-3.0_p2-r6.ebuild:
added selinux policy to rdepend
*dhcp-3.0_p2-r6 (08 Mar 2004)
*dhcp-3.0_p2-r5 (08 Mar 2004)
*dhcp-3.0_p2-r4 (08 Mar 2004)
08 Mar 2004; Seemant Kulleen <seemant@gentoo.org> dhcp-3.0_p2-r2.ebuild,
dhcp-3.0_p2-r3.ebuild, dhcp-3.0_p2-r4.ebuild, dhcp-3.0_p2-r5.ebuild,
dhcp-3.0_p2-r6.ebuild, dhcp-3.0_p2.ebuild:
Forced a version bump on these ebuilds. Basically -r0 is now -r4, -r2 is now
-r5 and -r3 is now -r6. The reason for the revision bump was to make this
package PROVIDE virtual/dhcp. Closes a long-standing bloat-reduction request
made on gentoo-dev mailing list by: William Hubbs <kc5eiv@kc5eiv.homeip.net>
at http://article.gmane.org/gmane.linux.gentoo.devel/11579
09 Mar 2004; Bartosch Pixa <darkspecter@gentoo.org> dhcp-3.0_p2-r2.ebuild:
set ppc in keywords
04 Mar 2004; Gustavo Zacarias <gustavoz@gentoo.org> dhcp-3.0_p2-r3.ebuild:
stable on sparc
24 Feb 2004; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild:
Bump to stable x86.
14 Jan 2004; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild,
files/dhcp.rc6, files/dhcrelay.rc6:
Use proper pid file and directory. Fixes bug #35751.
14 Jan 2004; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild,
files/dhcp.conf, files/dhcp.rc6, files/dhcrelay.conf, files/dhcrelay.rc6:
Add dhcrelay startup script. Contributed by Martin Jackson on bug #33895.
14 Jan 2004; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild:
Readd the ebuild and chown patch to address bugs #27079 and #36869.
05 Jan 2004; Jason Wever <weeve@gentoo.org> dhcp-3.0_p2-r2.ebuild:
Marked stable on sparc.
31 Dec 2003; Guy Martin <gmsoft@gentoo.org> dhcp-3.0_p2-r2.ebuild:
Marked stable on hppa.
18 Nov 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r2.ebuild:
Some fixes from bug 31840.
07 Nov 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild,
files/dhcp-3.0pl2-fix-perms.patch:
Remove experimental version. The current stable works correctly.
Finally fixes bug 31840.
*dhcp-3.0_p2-r3 (05 Nov 2003)
05 Nov 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild,
files/dhcp-3.0pl2-fix-perms.patch:
Experimental attempt to fix 31840.
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.
22 Oct 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r2.ebuild:
Use enewuser() from eutils.eclass.
21 Oct 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r1.ebuild,
dhcp-3.0_p2-r2.ebuild:
Bump latest to stable x86.
*dhcp-3.0_p2-r2 (02 Oct 2003)
02 Oct 2003; Mike Frysinger <vapier@gentoo.org> :
Add patch to fix user options to dhclient #30049 and add USE=static
support #30026.
16 Sep 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r1.ebuild:
Set proper ownership on /var/lib/dhcp.
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)
*dhcp-3.0_p2-r1 (23 Jul 2003)
23 Jul 2003; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r1.ebuild,
files/dhcp.conf, files/dhcp.rc5, files/dhcp.rc6:
Add support for the dhcp-paranoia patch which allows to run the server
chrooted and under a different user/group id. Remove unused dhcp.rc5 file.
Create a new startup script and dub it dhcp.rc6 as that file isn't currently
used by anything. Other various cleanups.
17 Jan 2003; Daniel Ahlberg <aliz@gentoo.org> dhcp-3.0_p2.ebuild :
Unmasked, security update.
*dhcp-3.0_p2 (15 Jan 2003)
01 Mar 2003; Jason Wever <weeve@gentoo.org> dhcp-3.0_p2.ebuild:
Applied fix for bug #11960 to omit -O flags so dhcp will no longer bus error
on sbus sparcs.
24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> dhcp-3.0_p2.ebuild :
Added testing mips keyword to the ebuild.
15 Jan 2003; Brandon Low <lostlogic@gentoo.org> dhcp-3.0_p2.ebuild:
Version update, and update the ebuild to automatically assign
it's source name.
*dhcp-3.0_p1 (29 Dec 2002)
24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> dhcp-3.0_p1.ebuild :
Added testing mips keyword to the ebuild.
29 Dec 2002; Daniel Robbins <drobbins@gentoo.org>: Renamed from 3.0-r4 to
reflect the version (3.0_pl1) of the sources being used.
06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
*dhcp-3.0-r4 (21 Sep 2002)
21 Sep 2002; Mike Frysinger <vapier@gentoo.org> dhcp-3.0-r4.ebuild, dhclient.c-3.0-dw-cli-fix.patch, digest-dhcp-3.0-r4
Added a small patch per #8088 to fix the -nw bug (patch comes from upstream)
*dhcp-3.0-r3 (16 Jun 2002)
03 Sep 2002; Brandon Low <lostlogic@gentoo.org> dhcp-3.0-r3.ebuild, files/conf.dhcp,
files/dhcp.rc7, digest-dhcp-3.0-r3:
Update ebuild to touch dhcp.leases, fix config and init.d files
to work more sanely.
*dhcp-3.0-r2 (16 Jun 2002)
21 Jul 2002; Owen Stampflee <owen@gentoo.org> :
Added PPC to KEYWORDS.
6 Jul 2002; phoen][x <phoenix@gentoo.org>: dhcp-3.0-r2.ebuild:
Added KEYWORDS.
16 Jun 2002; Brandon Low <lostlogic@gentoo.org>: dhcp-3.0-r2.ebuild:
This moves the definition of which ethernet ports to listen on to
/etc/conf.d where it should be this is prettier now thank TrAns13nT
for making fix this bug.
*dhcp-3.0-r1 (6 July 2002)
6 Jul 2002; phoen][x <phoenix@gentoo.org>: dhcp-3.0-r1.ebuild:
Added KEYWORDS.
*dhcp-3.0 (14 Feb 2002)
6 Jul 2002; phoen][x <phoenix@gentoo.org>: dhcp-3.0.ebuild:
Added KEYWORDS, SLOTS.
14 Feb 2002; Daniel Robbins <drobbins@gentoo.org>: New 3.0 release.
*dhcp-3.0_rc12-r6 (1 Feb 2002)
1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
Added initial ChangeLog which should be updated whenever the package is
updated in any way. This changelog is targetted to users. This means that the
comments should well explained and written in clean English. The details about
writing correct changelogs are explained in the skel.ChangeLog file which you
can find in the root directory of the portage repository.

59
net-misc/dhcp/Manifest Normal file
View File

@ -0,0 +1,59 @@
AUX dhcp-3.0-fix-perms.patch 485 SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018 SHA512 6d3ae697faf576bac801d9c302187ed7c8691eb991e0f9866e528ef7fb72592ba239b7519124919c44e4fff6108e4f13d83c1c0bb35d022f7a702b1fb06a6333 WHIRLPOOL af9a21870c2b1785573ea29f82dcb6b5629b9d6f0de94fa49e60576645d721debc8c6d01a29c4a6daeff91abe9674c5d07a8bca8b960893b51f85a0a43bfd56e
AUX dhcp-3.0-paranoia.patch 5366 SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae SHA512 7583ce88621c5f3c5f150129a4a3c82a20a237adeb689fb7067f23fc8a78ab89305741605284d9de0d5fb91d329c5fbd08361405845d5b34adf41a9b26261690 WHIRLPOOL 24afb961c2500bccdda097faac12a24215e0f0473310195552f69a789875f3ac61cbb904b69caa2109f2cd76a77ca96840baf375cc260db65b0e15dbedeaee9e
AUX dhcp-3.0.2-gmake.patch 1872 SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215 SHA512 4685947682df80c32d887a54206327012b14e23901b40d3677330ebd6a5a089f1aeb45ffca7ff5dbb0d980c077ea6a5c0552d67f43ec1e86f9b96195d3b17bd1 WHIRLPOOL fc28a5c1d510e7a825424a03c562a32089bf00efde05d03fb79244625e7605419226a77644d761691b54b51fa13e67cbf08f97d4ed4bffa225ed6bdc5ee3c7aa
AUX dhcp-3.0.3-dhclient-dbus.patch 2774 SHA256 d70292c5b61648ba5970ab436429ced33e807bd6f68ba06dcd2b9d4073b02ea4 SHA512 fe7d8423df7560874eef750fd55634bc291da72f969105d3b6413cc710b4ae474a24fc59c8634cf07ae6689b0a6d420007a104335f59b124da3f79ccbc5cecd4 WHIRLPOOL 9cedbf9ee520cbe1b7d858e352e718e1bad205d363d5e4df686eed0cb08863dc3a3db842177725317d3c84bd42e6c5cbfb6ae91caa6bbb2b7d07ea2c91c6a0a4
AUX dhcp-3.0.3-dhclient-hostname.patch 523 SHA256 57c09edd2bf48cd65745e3b14499f7f3c26d529f60fd2ab122887ae968e26bbd SHA512 0a0113951cbf8269928705edc568b0e424ab5d2f3c55950cba6c8dead43a641a85664f10eb748e7e8eb5644023b53f2392811d25abc5ee7d09bec1842e758ff0 WHIRLPOOL fc6a77d3d6fec5d54a43f41f38b1790ac42364b69fc85851e7d450aa9210bbc41c3bd61f13815233a30c8b85868111edccc4554ecdb5d65bb4cff86f04641257
AUX dhcp-3.0.3-dhclient-metric.patch 7270 SHA256 7e5ace014ed55d7d4e90a6cdac7dec4842ea9d178bb19bf6cdccf295eba9da7d SHA512 0cec4360744f0fb89c4b56e81e7b78b2bdffd731e74e9a4c7061102480096420bbe038a4d1553ae05e0d57bab86a00d8c51fecdb79d8c77b6e1cbad6ae0ad61a WHIRLPOOL 5c68d1d9e770e318ca7ca0e40d789c32dd7f1d56b8324ed711fb1267ad39eedfcf67704153cde7b137a09cdddfe332a0c7f8e7837f06876b0150621f82881566
AUX dhcp-3.0.3-dhclient-mtu.patch 6413 SHA256 0a4bff3c4c44252125f66a3a4423f677465592b84a8f7f500bad9ba4e3b5cb06 SHA512 109720c1efe63695e59d1ce37cb40de7d07aa08ed66bb6213cc47d104d5d445c73217e8803c0c66bb1470ef5c8b56e0f610409695d3feae2fcb15c08f24e5ac7 WHIRLPOOL 2f436fdb686f6fe35f4b7e5e518c25d2c9a001eb240ec2951535ecea399ba53bd57d244dbd7b96ab14a1d0d594139e8365f505e5d0b9cfbd92ced15055894b46
AUX dhcp-3.0.3-dhclient-no-down.patch 2332 SHA256 a5a67de79f6435d9bc4eeea416aff7a904ab567e5e8d75ecf34495bc9f2c5a44 SHA512 12440298f27980256bd797c133f2fe14fb55485c8631176c055122c2d874bbbed84dca75d5a2d2abbd37ca5ed0d3ab94c3383a5de9a35f1ac69c2c6a215ecf7d WHIRLPOOL 0993456be9b082368e7fdc20acf37af168ff55f4fbde381c6cc8d3940c4cd00b4c683c954ff1ce62c5ebc8d4c48d228a2eb77ee114eb2efdb726bcea9833f48d
AUX dhcp-3.0.3-dhclient-ntp.patch 5862 SHA256 80ab30eee75fb03c099416c25f031d03744011a582e8940c73077d5ee587c1ee SHA512 f9997b3aa6a6b8355dab62c177c1b407158ad28a844a45b9e49d3c8d9579029ff5c0f43bf48d2cbe26ea831b4a89c1206793f07a44b33ab823cd46f58048af2c WHIRLPOOL c640e7021e362b5f3a091201b1c08f16387bd2322023d8f8ad1ca5ec522f61a107a9d838682157a7c45415aa06968d835f4dd743a09e85ee1335df18c9942fa8
AUX dhcp-3.0.3-libdst.patch 322 SHA256 68e9a081739736980c0ad834dfa6197f940982f53d4d16054715c0346b5b9eca SHA512 b68479d0be9e10f12728c3813819f4eec47fb08f4df4df13bc260ddcf8084fc47e1f3bf5018918739bc08ed773409e14851be4867cb7214781e4586fe53038de WHIRLPOOL 89158dcc8bd3f34a0a3a354678bb53ef8111768e2e3d16a173a5de820832d131c49e42c73c5cda004f785603fcb151f1015105df139cebb52f7da499ab93f42b
AUX dhcp-3.0.3-no_isc_blurb.patch 3002 SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb SHA512 34a075ce95c620dbf0e72d7a317ea203856924ae112f86ee765fa10c315415869d33b9e60d74c2af56d65aa750c5c9b551b8d2529f4aec2399dfed9b09d9d248 WHIRLPOOL 14497dc268adb2087c9a4798fdf2c3107d9dd2932138bb7f45f2078c2f24bf9f1460eb653eec268bac98836de971acfd564485d281c43d9b73463dc8eed88500
AUX dhcp-3.0.4-dhclient-stdin-conf.patch 2176 SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f SHA512 58ec458116015860b8bec03ad8467216004bed530b73dfa13c8b1a136c9689da9e7d7d2f1f6899f8417daece5cd88df5ce5d876fc87353862e90a9d8bbb916c3 WHIRLPOOL 7bfac7fa5d9c35784fa35e60b86d8e989c3986415fd2fece85a85daad916365d7ff95179eec7ae84724357b3f73b675b821680adccf04fcf66de6b385ee25d3c
AUX dhcp-3.0.5-bpf-nofallback.patch 1473 SHA256 b215c5ff4a282b475f28168250c05bbbc85e7c37e7af92616571d499b8c14da6 SHA512 68916ee1f82b4b37f3badbb60ac797ef529624f85b15d81f473a658267d066bfb0d2e275c69f5cba0b85f92d5b1621e235695fc429c726cc0d59b84d6839c4e3 WHIRLPOOL 304785e63a7c8f76ba96e9a4783ee3b1f25924dadcfabcecbeb16fea9ec7fa6b0c60703deaf68858f9a2debda9bb212a45cf3d0f9c9bad07760b1d29acb61244
AUX dhcp-3.1.0a1-dhclient-resolvconf.patch 10316 SHA256 112b2ed44aab92592eb3810c61ada7f30d9d01fe43b647667326972a37b412a1 SHA512 595b01fe072577a889fd344cd3296b3367ddb6154b0a9e6d3251f57969f1762f344e3ce002628d43ed213180aaeff7280fda5b3002b873f6a6f306dd6ff6b081 WHIRLPOOL af217cf6c1e7f4bdbdd9735f1807319ba2185c75cce62164cf8084cbccbb82bda6fcda0d3cd178ba328bba492ba582f96e33bf5e4512c375dc3ac5131f5a65e6
AUX dhcp-3.1.2_p1-CVE-2009-1892.patch 427 SHA256 55bb136138b76d6fa9c9165b348fb2c6975b935b3bba72ea551fc8bcae4fcc9b SHA512 4d0fdc61126e16e70edd6a7b4c8bac98a8e19b70a79fcf8f48b50b3f1a137b08ab8f105203a0ff514d81da7c9ef979f248e11e3eaf82305c91619348e3457c3f WHIRLPOOL 8a46f7c576f3ca07c4f3476e18b4339b6643d8ea294a15daa84e4c52cd12a8613a08c7055413f79e475a418b2e447884a1082a14e629baa9b46d994fc69a59f5
AUX dhcp-3.1.3-dhclient-no-down.patch 2762 SHA256 94c9dbe45063c6c600976ffab4c1fc9ac6f52f4e8077b5074f5142816ea626c4 SHA512 40c40fe05afbe37dc78037956a6c056e520239586f895d373a309f1a3b60058cb867308ac50a7731b589dcf87a13db2676589e34ce817a5a41b821bc7fd5bc5c WHIRLPOOL 0acca442f21f306ff157a723b3a796d8671edb1fdfbeae40e76808100a6dcb4bca8119b1c3973db455f7d4193e083298ccb6a53655e160a8a826d95f41f498f1
AUX dhcp-4.0-dhclient-ntp.patch 7966 SHA256 e93bda7f2baae9163f96ab0408bfbe885caa96a8698f9e566b8a9dc04de9359b SHA512 548c865988e12d8dbff357d7b5400f7afbb221297765c4de265bc55c016d144d9d7acd0bc6536160d8ca849f7f5b830c2413f407e376216fc05c8bd4b152b927 WHIRLPOOL 2850679345d2da92e3868c47ccbc07b142e51f1c6257c4d8cc4c8736bfc03b23aca3e127e73a43ea0125fd6054796edddcf9d2768d5a52276e5921c6545a07b8
AUX dhcp-4.0.1-dhclient-stdin-conf.patch 2965 SHA256 0b25bc74ae258656dd1f0e6f4ffd6b4ef8b4ad56956624c0b6070941a180e57c SHA512 a65ad75be87f71d7e4021b0d875b9c1d123e9bb691ca9b555a0455ac12addfb4fd0c1e42ab9d5ec78ed0c3ffac40754b997b8729ca3e9a7907d989357ad83763 WHIRLPOOL 100e3dfff5ea75eaad636fb7c4519c08ca004ad6580b5dcf6cc73f041e0c96c0905b4157c1a72aae8d4e4f7031b853a8d348ed8334034a186971f57bdde8fd09
AUX dhcp-4.2.0-errwarn-message.patch 1508 SHA256 e2baa7b6097a6ca20b66afcd7b0e399840a8b0f251b3750a49a03f0d5b714231 SHA512 6471e4b73fd817740118a5db9ac801914f418360c3322e98c4c2417cb9f563729bb88885e12735ad35a9ec404ac345367300b47be0ca6c2a42673f3c6528ce8d WHIRLPOOL 3262c1433aaec67ce0fbd7cb83eaf47a4d2b264b67c082e0db704c47b918bfc8b6284de54ae205220e6ffa3d34cab360e7a94fcdf0aa6160ac9b0b4e5d8e1cf3
AUX dhcp-4.2.1-dhclient-resolvconf.patch 13742 SHA256 ddc284623b421098702d3e0cc1849b37c015e78dc510aa7efdd2e5fc9b6a849c SHA512 edd0b70196650216a669de5cb5661a2b5225e2bbecdf15f8862173cfa821f27448eb30d4ba6b4244e26e1aa898e624a8e3ad3c95c8a192ba12eb9a436fe2e61f WHIRLPOOL dfd18488ff027bfb688877d7634217ddd43ffdbfa8a9230efd82c545aceb514a88def6d7a3a0dbc308c4b21934ab292bb75680e8c243afbb63bf2ad70ab8b5de
AUX dhcp-4.2.1-nogateway.patch 1648 SHA256 694caca5fbcf900cef2223307a43fb21a66fd672728cebfd873313730029acc4 SHA512 4b2fce7cb99d490f16382c80fb5615a402a3a655c960151ef49b1d7757caedb471445f3333c50707053b6438cc83297def87142824a4e17d4a43ce85b66c2141 WHIRLPOOL 9282d13538ad2f0cbec74bdc073e61c1707515bd6c6a98299ad7d929ac86a2c6755e482fde48a75368bb01cec036e0abc9fd62378c83a636810d0caa0604cc24
AUX dhcp-4.2.2-bind-build-flags.patch 476 SHA256 a16d9da5fc29c95c46cf7e2401744292b898f692d49dea4753991505e03c1ca8 SHA512 f552f2b8b1e13e22636f8e4548557801273b0ab38f076a141adb72584ad55b4da156401d94abd12e9364b8632a6e75ecbf3cd90af3b6dbad88627ad3f9658059 WHIRLPOOL 3202f614747eaa9b533e36495bfa862eb96b3e884cb4939a8406fdbded56061aabea20e9249d647e6aa8ed5ed5547d5c8f14c46af193c248239a2734dc79411a
AUX dhcp-4.2.2-bind-disable.patch 390 SHA256 0871e10198af86414f85c72d21beec640cb0b7c7c4ccea2550d4886bade1417e SHA512 4f852b3fe9dbc18ffa4013fc54aa81ec1009289569c504de10bd01f42798ea21b08567c84e77fbac09ec43038c4da1f0c5579c34ab19e0a038dcb2f61f078df1 WHIRLPOOL 039e71725dbf05e8e74916be490dca13459614038eaf0bfea6a5a5cfd0a72604db4bbdaf02cd8126c4649e7033cbbf39da11d46fee1b83424f41952534230342
AUX dhcp-4.2.2-bind-parallel-build.patch 304 SHA256 cff322da581742ef1a8019641ee9689c588c3f9fef883b55e28af52823f08838 SHA512 3dee3b0ae5bd512bd7be6d5be7b8cfca8077065f6a3463089bf9ff5fcb556b3333fb8d3aeadf25ea7125fb6eff2ef6967b2878c9312046fa378c8acf0c9cf9d2 WHIRLPOOL 4dbc45c32b7da7cb6f591356290f598308083af3df309cd8e6908b586cbec3dfa6d7d582a3f3675112ff46a15db9c0e1abe727b8b8b4c2168c21a97905f9fb13
AUX dhcp-4.2.2-dhclient-resolvconf.patch 14535 SHA256 a87f33e33fc3f3a103264909cc85c477036949f2c00c428d562c12b560f09877 SHA512 2e5343c3401c61c8d33e0b16832dd3daec308b4c17f67f5ffa86b13e194f2cb96db6c3696134df1114b839261b03bc890becf925465f312ab67855db33738abf WHIRLPOOL 203bb55c61b7018efdfb9c8083bc70c8a23693da90943ae7720c8968b3d7dcb0d2f27699e3a417efe8bde69347d762d9c0433093da03599cd6a0a67fd603a5fb
AUX dhcp-4.2.2-dhclient-stdin-conf.patch 3017 SHA256 701da4d022490bf9e1cfd946c752a00a2d2ab9a1fd5030281c1608f367cc68fe SHA512 1adfa938e5531040008981dd4dcba37219bce0794524d3c3530eff527528ef7b22aa6fd540f9ac175339372e98347c0a91b86b4bb5f2aa93f04217b9902c3388 WHIRLPOOL c42b3880b5cf710613021c192fc5bc1290bd04db9d79b991bac9e361f58fd84514044a19a5eff82695845e017c996cd46b29b697bfe718e51fba413caf925096
AUX dhcp-4.2.2-nogateway.patch 1671 SHA256 3fed5823812c134e1819c8ac10c5fc718df86f4013ffc7505efbbe692319480e SHA512 fefbb402020dfdc3eff75da50bfaed0f30c5b90facd4b4ca25ac38d62f14bb85b18028261b32ac3f4654afc8e6915fcdd6f5e580444f2efe882f6f75ea10be0c WHIRLPOOL 91d38301aaecc4a2199ffd0be19d5c2b36531446524aeb65e743adb82220d20b18f53f3e740b5286bdf578f8fd35b2511f52747406b914d1c4d2841d1677e1bd
AUX dhcp-4.2.2-xen-checksum.patch 8204 SHA256 047d0d688ba164884772b1517e9a834405e24656fd075fb2f0fb3fb1ae39fd57 SHA512 00cec5717d02784363e23f7bb20139982103e2de06e9e45babf01224c80b6c2991e3151c4a420d02b3133ac7dab614cc6dc69f05a5557e4f32599cde0aecf8c1 WHIRLPOOL 9af148e5c0ab84572950a01838dbccf203e366e8aa551ab7f22e196fbc1b030ef2fb64ee1c309bb7d1ff9a5583aa053325513d7e2569c17d086fa69422d908e1
AUX dhcpd.conf 1092 SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5 SHA512 21467475571e914b60084a20eacba794806631c84c33e5977db0c5f3b572752c2518c807daac107ec9cbfe4d4ef0cdf54e9797d7ab064e7386b586b00619e035 WHIRLPOOL 0c9a81b3b19f6b91687db7a7ede9107afc0e50fe1ee9d86e848fa444d0da9c55798b545cb8215ec1149d48163a944d6f86969430570b26012f0a19413cff278a
AUX dhcpd.conf2 1068 SHA256 e8a413e9102948b336f60041fc3cade33125faf56d8319ee65d9f3c63199a8e7 SHA512 7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d WHIRLPOOL eef0331ee019b561de2f3e46860d2c470f6de05be9104f46316d61b09bad9687d916af94eb4b399612bfd05340cda5f68f87886200801de485bd3665cc0886b9
AUX dhcpd.init2 2421 SHA256 fef93e5a7264780044a977ade27e9cc70de824063791bcd07d3db81c11c16df5 SHA512 ab7f9c310ad7d6342aa996ae4a94f71e7df71ecaea569cec721637f75ba1a26681769181ef6f2eef1b11cb6bbf5827ab7503ba6012a689d82ac1b96eb918c444 WHIRLPOOL bfc0a4e31521c8b527c5c47ee449d2f2c9e84c4316fa869ba019fb31c9cc9db884d65d016a537c53874556fdc95165039705943dae32b30a8853900685cbfc2e
AUX dhcpd.init3 2525 SHA256 69f5e6bee391a9a03554bead07c9dd5775e1fbb2a0ae515b7930cec328a8959c SHA512 457ba7e00bf28245e1c5a9cd9ca1ac98d623c12a646d15a97ee30b4d74ecbb723d39d65361952094b3ff2d98db53645ab9ecd4ff96243aab3838287beed93059 WHIRLPOOL c9bba43196c29cb992412499c2574c114b704fe81b55b8c4a7e424df22ae78290945b21056889c56c91d7f9c73f1ae698ec013637e0a306ca4244acc3c7e6109
AUX dhcpd.init4 2902 SHA256 6d746cf628d4dd4a191cefc4869bbe12b0fb9eb69b69c062ad4d3e3b369e9044 SHA512 3c4c5a7fecddbb8ab5891d470958dcf85a5b32fad8c0fbb3144654d9f6b45461a8e3a1d7cb7a03cc5e1eab4ed351ca9f4f6eb306b533b68fe84497b2016f68fa WHIRLPOOL 52efd0ef428a22fb7dab78ca9b40247163f4d0de9061b9b807342c12130a4f3af80770a6a97036d9fdd883cf48b9617c37a134e2592e7e807a42e3622f1365b9
AUX dhcpd.init5 2874 SHA256 d724ed829c8d13595f1609644308656141c8057ab06fad6cf6afe80caf0f6229 SHA512 cb6131134a8bc1e341aed5da571bb642bcc0edd9969ddb7b9b21ad8f13e6191047c6f1837d8556e0a9709f0c3e4dff66ee76c01a8a4beced5258736b80de6b91 WHIRLPOOL f299f625156bfd7618e5054e89e0293c596648f7c91c514341ccf00473c1231a2f7f04bcb19e0e3ed4cd949aa9cb67c6b8f312cbc7cbd1d089e742d2e729aa26
AUX dhcrelay.conf 421 SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730 SHA512 fd15dbaa4c61c3c26f407bf13dde859470a1adba134da064b653ccc152ce42635ee8de2fe113ae21ba8470e97e3caad8c1a47b69eb25e5e92b40e26790b96f6d WHIRLPOOL 8622e32e4c4681efd8f6087917f745c3e12013c04ab7ba666d72a2ce0cb55b9bdb13be13abaf7dd9d3d35a31d44bfd1d89d9bf69f6296df2b83a0b3b9fb370ae
AUX dhcrelay.init 736 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c SHA512 4cbd52bcdf63d94ec38c3a530694e4bed29e1fcb1330e5f17db86e6e1d1fe6c75d6f55b2d6ef3090d98be1fc9b21ca053b319893e8a1478047bdb14832eef935 WHIRLPOOL 4d6925714702eb8214892afd9d5d587b5823f57be3541da1dc6904233470fcfd8fdc1356c508fc344a8697808eb208045a38983b9553c8c63595c512c6ba4279
AUX dhcrelay.init2 712 SHA256 6cca726147474c600662b0c2e49eb5aa148a7a9af1358dbc56f16b1d08255ae3 SHA512 13dd120fab5c425987e4dbd2a03fac88822239c178d803b0277fe71b6319aa37b507fc1125a300c916115e725b10866b1f2e10ecc2c05f70345776084e869711 WHIRLPOOL df30792ce247a7fe6dbdc590ea83e196048fcfa53aae67d7402de60ce46662b74da0bd473523fc02cb9a4fee056ca700c0627eb73902eed2f9313cc062ec7ee7
AUX dhcrelay.init3 800 SHA256 411fea507b997365606538d645b2bc75f5ee166ec805685f68075e49f2126dbd SHA512 4bff694a818c3791e9a853f3c53b4286e63231d4730ead6bac7a87b5839c02a7c9a49d6f9c88443e36edf7e5395bd397fc456c2a1db1e2ec57d36f8846852d13 WHIRLPOOL f5c0b7516db476983ded4cdf3df664925af1435eaf7eed7b0988ca701765fe9b53c55d1974318793884c409c3ccfdfad2e9d9855a57e014d86c0107431aedc55
AUX dhcrelay6.conf 325 SHA256 099f668e1ad42ed9446b15675032a1186715d1fe9e4a1b24dfb787e68495d2b6 SHA512 40d3a6bdf8521bf5152cf31b961aea88b2fb0339433d0b6a6360a16c796298620b377bd079c0246e97bc9c0533ddb13bbb58cc5169d0ca598e3a51d1a607a9e9 WHIRLPOOL 7fcb1b63d12b066c6fc2668497d18ae33b739cca4dbcbc95530d762c7152c410a0af76e65ebb21f3c9c4a837b999799da4a766315e5eb667ccde64100b66b6fd
DIST dhcp-3.1-ESV.tar.gz 797454 SHA256 e316b7dc34f05e38724273a473f823719281f229a71a80bc358f8e74687fd7d7
DIST dhcp-3.1.2p1.tar.gz 792355 SHA256 e0cb405e0fef0ecebec7aaed294032a06178ff28be87498596e6069ccda4341e
DIST dhcp-4.2.1-P1.tar.gz 8797289 SHA256 6cd5e06512c53ad43d71400f39071ce0bd07f074e416c727d5bc7e5949ec55ec
DIST dhcp-4.2.2.tar.gz 8764108 SHA256 846ee115bd3a789ef4d8d051e1078b920b152c5644179c1a28ed59aa1b5ee38c SHA512 b2eeb8675414a94126e40bea5846be739488e38991f69e2c65c227756a156d6d1d337ed2fbffae7fff400b7fead2280cdbc88d8340401676b21a3e7e3cc65223 WHIRLPOOL 32c0b5dc1da38e577d3fa771bb29ea2a7fe9ebcf25583e4ee817db8db402e0bf7b56aa1e507e3f9ed62eb195677fcf66c23818674adf37c591e3393b19ebf06d
DIST dhcp-4.2.3-P1.tar.gz 9525670 SHA256 4860625e07c290768d513b9a2260e655ae4bad4cc5c4c8f5eaaeb4f9cbfa96af SHA512 3036775e49e2843992122fb4fdd90be1544c93634a0b8582581d4740e14f8a8afa5fa627e5f5f7ec0908bd4aa7112cc97d53ca065c27a04a28699fcd374739c8 WHIRLPOOL f52de3d74c9fec5d1ac1ef0e6fa9c8886e30ce9e8df006212d84995d42118651443399ff23b1a93884ef25a2f0d089ec9db2b358f00eba30bbddf06170b2739c
DIST dhcp-4.2.3-P2.tar.gz 9527546 SHA256 5cf7ae2cad9c4ca0103748b2476ec8ea78484e408f8fe597e4e0a4afb051b469
DIST dhcp-4.2.4-P1.tar.gz 8187359 SHA256 d3baabef27fc006e1ce1c4e3d03d7e5c4b6a34d5a2f45fa47d69235ed25ad420 SHA512 95fec55249bfedbd7cf6cd7c6cc32289a5520ae91f9b3a66e815518e80b0bcfb6cfae1f72db50fff5fa5e1c3ca091b9c8a4272cadc0772af92b88cbdffb2bb6e WHIRLPOOL 1822d61128138f85b38bdf86e6467f8e438f33bba92d4e9f4431e5d5d9dd346b2fed1cd2cd471929ec638cd12c225939a5f1a9b1721591b36de68bdce6b65695
EBUILD dhcp-3.1.2_p1.ebuild 7582 SHA256 4ebe414e6dc4ce6f6b9ebf4f0bfd44b6af03330ff48c39ad7c9987ac1cae624f SHA512 c00bb45b8fb4f404db1be2c1d1e153fd93e2633e8a66dfc7c6dec929813b9e831bac9ded142398471dfbef74e21c864527a315880c0cca5dbf9bbe6648e601cd WHIRLPOOL 530ac45367464ca2eb6a26a6a584d90e782e5e311b945b0fd1e4ba0dba42aca90364c9fa41ef90b7334ede6490ae8aee7926aaefcb9b21be3edd604e96b2b3e0
EBUILD dhcp-3.1.3_p1.ebuild 7741 SHA256 7a71c86e1685858826a09f28dff77d69a98ec1d37c93bbb6e4dd216af00ce96c SHA512 8be7381eede64146e6e64f04eb6d4c4258e4cfdef81ac14473f674fc816311f15fc4c619965e07459cfab80f937f69fe03e63fb8123707e4621a3e7b985f3080 WHIRLPOOL 8bd951f3f51da40bff701f3957468688c30bff295c865383c0991ec305e39c11477b0e139468acc0fc3a2edceb31fba3e6271a746ee98f371ddd81759b33aecd
EBUILD dhcp-4.2.1_p1.ebuild 6610 SHA256 70534d654d5a2d02ea009d87f77bf86724ee94b7587f5b6959eef90475e5062a SHA512 930023113e1d8eb630b87f88622dce959f6c83ec51d8ec79963f8f34dd6c31904152372092f68bf4c193e362c1bef7900ab6056ec1de12792f9088687d9e3b89 WHIRLPOOL d81ed1dc1e71a4211d7be0482c0e99de16afdec85ad718c1c11b449d6522b70b9c507849092a4a7c987793729ce9ceef51b117cff4381d2568d2b8c684fb147e
EBUILD dhcp-4.2.2-r1.ebuild 7892 SHA256 fbdd748e82fb55d4e222dd3846488fd273227540cd098badbc4be1bf0d7b7071 SHA512 233246f3fbadf3ea81053b035f67b97d03e28ab35cbbaac7f5cf3911f518bbb03e38afd011f2253cee0945a576cb88c6f874546c9401d62aec3eb51d06f296f2 WHIRLPOOL 36255391687edb3c5322256687711c050413be658f663f6cad82324b29f8f2df9277d5f1e2896bd0153041d9b2ceeb03786535a2f26f35b3af716b767a175a20
EBUILD dhcp-4.2.2-r2.ebuild 7107 SHA256 c9ecc844f738beb83667633adce767783e00b92b500a25cf01131d081f8d626b SHA512 a775aec5885eaaafb9930723f8e586d95be75920dabe956bee0f25f0673718b548134c06cd1f6b182ff7a6576de790e342cf9c1db5e03f20ad1f537c83bf433d WHIRLPOOL 0f6d64f5797684f03d93854ea7c7861920765b54931a14c22d747da2f1323e9c651011c6c45d614ce06dd4fd431fcc50dc91be5a055c39ca3b53658c2038dfd7
EBUILD dhcp-4.2.2-r3.ebuild 7143 SHA256 f2ce7dd86a7f37b03c832216adb08cc6b2302bb45575ba6328aeabbcc3ccfb86 SHA512 d2484755c7aad3e3ea747309174b47f2817c5503e896d464228f35ccb4c62619eafe11568699ebe8cfe39cf7727eb16c3e8c0583b5efb88e96e756bbba8a0b54 WHIRLPOOL 36630b017173c72c5b7bb3e9c56bb5c941f9e15f38535baf00e2daca8dfa1e906a7575f2c287fb20fa0a5815058256c7091f32da124963f3ce245d9529d16fb4
EBUILD dhcp-4.2.2.ebuild 7474 SHA256 9f15f5b2d35d9ff4372250886f3751b94abb0fbebc99ea4d16e5abd74ccf9755 SHA512 dd436ff5478f4d5c280be91e226491b4588c292313e7ad7f627aa961dad437e057a58c4abd7be67411d15c48336ffdadf0e07430f01d5e7729629973b71a5c29 WHIRLPOOL 70f73858d6b5e8f549162b4668ed22fbe9868168d39c5bfeb525589c58c7594489efb24c83bf5172aaad69bb8280572d894d66277a4877fbd7a8711a95caae1a
EBUILD dhcp-4.2.3_p1.ebuild 7211 SHA256 663b373b3661a23ae1364ba18a52ade63022aad8229bc1b275cc82d110b07253 SHA512 469187bbf12ab52530e85a9227ae9d52aa617aa9a16732f21cb22e3987e681dd44b69f7c4dd3c5eb9ec207d8ab9ad34d1a61504d8a24c23eb3a494845ae6564d WHIRLPOOL 23a042697190429f090e31daedc663059c00e6228e8b9193e78f30e3799fa24bb7a3e25a3b58bed3e2e70d2ff5d625916a06b91d33580527005d96357082ee18
EBUILD dhcp-4.2.3_p2.ebuild 7242 SHA256 cb357fc0589a09af61868fedcfc31dad70df8278a5ef78a1cd23ae96170ded9e SHA512 69eefa262861c301d5de344eaf45dfc88d211a1b0434d6898fc8bc802ec8804b7e588d5dec524183c193c2a8d41e95eaa0f2272ba3fb64a37641ce45df3fc86a WHIRLPOOL 5b0263ae207a72874c4d3576845d8f973cb768c22b2b19993b0eaa78f83f20984da74fbb35ec45725fa7f2b56666c26b7c26e39112414da194e640a901f248a1
EBUILD dhcp-4.2.4_p1-r1.ebuild 7332 SHA256 73d2fa10d864d5f41bfdd65680db0dd587fe92826c3fd0f1a862a7a24d220fb8 SHA512 a2622012599fd7a68baaa334f9039da5584e4c6bc413160fd10dceeb75aa4f40a321dd434768c57e509a69dfe4d2808845dbd8cb96109d56b275446f4ab40ac3 WHIRLPOOL a99d8cab7e3a6c779fd6dae42616d5059f2243d36c9eb19ad1369ca06ec08986d866414c45a5b4f59aaef17c727cb277f7b19e84e0891dfa55a141d1ceb78cb1
EBUILD dhcp-4.2.4_p1.ebuild 7236 SHA256 3d49361c1f952bbc3e14a46b872f33ae6cac102842ea6c6ac2f5ad326dd90da0 SHA512 d00831932a3cfdb7ff0cf451ccb29a22812a79c82800b4faad9d82289002728744bfa58046f60dcaaa08da21657ea10818a8eaf75f7ee24bb8d8d6fac3c136f5 WHIRLPOOL 47259067563ecb691837308974f57c98a4c79339ee19f6f2afc8b18e6d3e20425d70fda4a5ce731680ebc901357607315dfc7e82b6e1e54dfc6c4be0324d02f7
MISC ChangeLog 36584 SHA256 80fe996ef5b3704ab2201605dd2361543357691b90fd1ae27d1d2cb1dc124f4b SHA512 4946fe04a335f94d5ef5e7a1f2d1d965591831df1baea0161939e217c5bb37ef3bd29637f6e693114273a3556aba7b36cf04f3d50cd9468ed6e3414b2e4904e2 WHIRLPOOL 479ed1361c99217b5e9b5e723f6006419ac6afcf20a6441764abde2c3246f5e787ffa5bbecffffb044c0e25ebff9b125544c209e846d7d172c3e1ed44b68e4b5
MISC metadata.xml 500 SHA256 e9e4edcf7671391ee2f2af0917a75fc07883f1401aaa22b72dd0133bef81601c SHA512 52b56888b04bd8533e00930fddeccac3f1e6a4e6172b57489f52300dcf60191784fec25e94916dbc9ff007c1493fd8144ec30458b4de3589d31d6f2ddafa78b2 WHIRLPOOL 9631e8fe91b7874d03b4f91ab8ac3064a9c259433a7f27214580ea6643c3784f1988559e9c0336fd3508def32ea0ec7be74be20e8ff7d62f0d47b45b478e8714

View File

@ -0,0 +1,241 @@
# Copyright 1999-2011 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.10 2011/04/15 21:40:50 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="as-is BSD"
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"
}

View File

@ -0,0 +1,246 @@
# Copyright 1999-2011 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.10 2011/05/01 09:50:20 xarthisius 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="as-is BSD"
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"
}

View File

@ -0,0 +1,222 @@
# Copyright 1999-2011 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.2 2011/04/15 21:40:50 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="as-is BSD"
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"
}

View File

@ -0,0 +1,265 @@
# Copyright 1999-2011 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.3 2011/09/19 17:14:51 hwoarang 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="as-is BSD"
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"
}

View File

@ -0,0 +1,233 @@
# Copyright 1999-2011 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.10 2011/10/11 16:28:53 jer 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="as-is BSD"
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
}

View File

@ -0,0 +1,234 @@
# Copyright 1999-2011 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.1 2011/12/04 22:45:06 vapier 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="as-is BSD"
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
}

View File

@ -0,0 +1,259 @@
# Copyright 1999-2011 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.3 2011/08/27 04:58:56 vapier 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="as-is BSD"
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"
}

View File

@ -0,0 +1,235 @@
# 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.9 2012/04/28 01:13:59 aballier 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="as-is BSD"
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
}

View File

@ -0,0 +1,237 @@
# 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.1 2012/05/16 05:08:40 vapier 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="as-is BSD"
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
}

View File

@ -0,0 +1,240 @@
# 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.8 2012/09/20 13:29:07 xarthisius 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="as-is BSD"
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
# Fix UDP checksums for VMs using virtio
epatch "${FILESDIR}"/${PN}-4.2.2-xen-checksum.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
}

View File

@ -0,0 +1,237 @@
# 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.8 2012/09/20 13:29:07 xarthisius 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="as-is BSD"
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
}

View File

@ -0,0 +1,15 @@
--- server/dhcpd.c 2003-11-05 14:08:09.000000000 -0800
+++ server/dhcpd.c 2003-11-05 14:15:32.000000000 -0800
@@ -602,6 +602,12 @@
if (lftest)
exit (0);
+#if defined (PARANOIA)
+ /* Set proper permissions... */
+ if (lchown (path_dhcpd_db, set_uid, set_gid))
+ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid);
+#endif /* PARANOIA */
+
/* Discover all the network interfaces and initialize them. */
discover_interfaces (DISCOVER_SERVER);

View File

@ -0,0 +1,207 @@
paranoia (non-root/chroot) patch for ISC dhcp 3.0
file to patch: dhcp-3.0/server/dhcpd.c
update from paranoia patch for ISC dhcp 2.0
Adds 3 options:
-user <user>
-group <group>
-chroot <chroot_dir>
Notes:
-DPARANOIA must be passed as an argument to the --copts option
of configure. Otherwise, the paranoia code will not be compiled
in. Example: ./configure --copts -DPARANOIA
The chroot() call has been delayed in order to allow /dev/log to
be reopened after the configuration file has been read. This is
beneficial for systems on which /dev/log is a unix domain socket.
The main side effect is that dhcpd.conf should be placed in /etc,
instead of <chroot_dir>/etc.
If dhcpd is to be run on a sysV-style architecture (or, more
generally, if /dev/log is a character device), one may opt to
create the <chroot_dir>/dev/log character device and add
-DEARLY_CHROOT to the --copts option of configure (in addition to
-DPARANOIA). This will perform the chroot() call at the earliest
convenience (before reading the configuration file).
If the -user option is used, the lease and pid file directories
should be writable to the server process after it drops
privileges.
ari edelkind (12/10/2001)
last modified 12/10/2001
--- dhcp-3.0/server/dhcpd.c Thu Jun 21 22:12:58 2001
+++ dhcp-3.0+paranoia/server/dhcpd.c Wed Oct 17 08:23:00 2001
@@ -56,6 +56,16 @@
#include "version.h"
#include <omapip/omapip_p.h>
+#if defined (PARANOIA)
+# include <sys/types.h>
+# include <unistd.h>
+# include <pwd.h>
+/* get around the ISC declaration of group */
+# define group real_group
+# include <grp.h>
+# undef group
+#endif /* PARANOIA */
+
static void usage PROTO ((void));
TIME cur_time;
@@ -204,6 +214,22 @@
omapi_object_dereference (&listener, MDL);
}
+#if defined (PARANOIA)
+/* to be used in one of two possible scenarios */
+static void setup_chroot (char *chroot_dir) {
+ if (geteuid())
+ log_fatal ("you must be root to use chroot");
+
+ if (chroot(chroot_dir)) {
+ log_fatal ("chroot(\"%s\"): %m", chroot_dir);
+ }
+ if (chdir ("/")) {
+ /* probably permission denied */
+ log_fatal ("chdir(\"/\"): %m");
+ }
+}
+#endif /* PARANOIA */
+
int main (argc, argv, envp)
int argc;
char **argv, **envp;
@@ -236,6 +262,14 @@
char *traceinfile = (char *)0;
char *traceoutfile = (char *)0;
#endif
+#if defined (PARANOIA)
+ char *set_user = 0;
+ char *set_group = 0;
+ char *set_chroot = 0;
+
+ uid_t set_uid = 0;
+ gid_t set_gid = 0;
+#endif /* PARANOIA */
/* Make sure we have stdin, stdout and stderr. */
status = open ("/dev/null", O_RDWR);
@@ -298,6 +332,20 @@
if (++i == argc)
usage ();
server = argv [i];
+#if defined (PARANOIA)
+ } else if (!strcmp (argv [i], "-user")) {
+ if (++i == argc)
+ usage ();
+ set_user = argv [i];
+ } else if (!strcmp (argv [i], "-group")) {
+ if (++i == argc)
+ usage ();
+ set_group = argv [i];
+ } else if (!strcmp (argv [i], "-chroot")) {
+ if (++i == argc)
+ usage ();
+ set_chroot = argv [i];
+#endif /* PARANOIA */
} else if (!strcmp (argv [i], "-cf")) {
if (++i == argc)
usage ();
@@ -397,6 +445,44 @@
trace_seed_stop, MDL);
#endif
+#if defined (PARANOIA)
+ /* get user and group info if those options were given */
+ if (set_user) {
+ struct passwd *tmp_pwd;
+
+ if (geteuid())
+ log_fatal ("you must be root to set user");
+
+ if (!(tmp_pwd = getpwnam(set_user)))
+ log_fatal ("no such user: %s", set_user);
+
+ set_uid = tmp_pwd->pw_uid;
+
+ /* use the user's group as the default gid */
+ if (!set_group)
+ set_gid = tmp_pwd->pw_gid;
+ }
+
+ if (set_group) {
+/* get around the ISC declaration of group */
+#define group real_group
+ struct group *tmp_grp;
+
+ if (geteuid())
+ log_fatal ("you must be root to set group");
+
+ if (!(tmp_grp = getgrnam(set_group)))
+ log_fatal ("no such group: %s", set_group);
+
+ set_gid = tmp_grp->gr_gid;
+#undef group
+ }
+
+# if defined (EARLY_CHROOT)
+ if (set_chroot) setup_chroot (set_chroot);
+# endif /* EARLY_CHROOT */
+#endif /* PARANOIA */
+
/* Default to the DHCP/BOOTP port. */
if (!local_port)
{
@@ -500,6 +586,10 @@
postconf_initialization (quiet);
+#if defined (PARANOIA) && !defined (EARLY_CHROOT)
+ if (set_chroot) setup_chroot (set_chroot);
+#endif /* PARANOIA && !EARLY_CHROOT */
+
/* test option should cause an early exit */
if (cftest && !lftest)
exit(0);
@@ -543,6 +633,22 @@
exit (0);
}
+#if defined (PARANOIA)
+ /* change uid to the specified one */
+
+ if (set_gid) {
+ if (setgroups (0, (void *)0))
+ log_fatal ("setgroups: %m");
+ if (setgid (set_gid))
+ log_fatal ("setgid(%d): %m", (int) set_gid);
+ }
+
+ if (set_uid) {
+ if (setuid (set_uid))
+ log_fatal ("setuid(%d): %m", (int) set_uid);
+ }
+#endif /* PARANOIA */
+
/* Read previous pid file. */
if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
status = read (i, pbuf, (sizeof pbuf) - 1);
@@ -888,6 +994,10 @@
log_fatal ("Usage: dhcpd [-p <UDP port #>] [-d] [-f]%s%s%s%s",
"\n [-cf config-file] [-lf lease-file]",
+#if defined (PARANOIA)
+ /* meld into the following string */
+ "\n [-user user] [-group group] [-chroot dir]"
+#endif /* PARANOIA */
#if defined (TRACING)
"\n [-tf trace-output-file]",
"\n [-play trace-input-file]",

View File

@ -0,0 +1,66 @@
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

View File

@ -0,0 +1,84 @@
--- 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
}

View File

@ -0,0 +1,16 @@
--- 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

View File

@ -0,0 +1,200 @@
--- 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

View File

@ -0,0 +1,180 @@
--- 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

View File

@ -0,0 +1,70 @@
--- client/scripts/linux
+++ client/scripts/linux
@@ -118,9 +118,9 @@
if [ x$reason = xPREINIT ]; then
if [ x$alias_ip_address != x ]; then
# Bring down alias interface. Its routes will disappear too.
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
- ifconfig $interface 0 up
+ ifconfig $interface 0.0.0.0 up
# We need to give the kernel some time to get the interface up.
sleep 1
@@ -145,12 +145,12 @@
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
[ x$alias_ip_address != x$old_ip_address ]; then
# Possible new alias. Remove old alias.
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
# IP address changed. Bringing down the interface will delete all routes,
# and clear the ARP cache.
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0.0.0.0
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
@@ -171,7 +171,7 @@
fi
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
then
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
route add -host $alias_ip_address $interface:0
fi
@@ -183,11 +183,11 @@
|| [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
# Turn off alias interface.
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
if [ x$old_ip_address != x ]; then
# Shut down interface, which will delete routes and clear arp cache.
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0.0.0.0
fi
if [ x$alias_ip_address != x ]; then
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
@@ -198,7 +198,7 @@
if [ x$reason = xTIMEOUT ]; then
if [ x$alias_ip_address != x ]; then
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
ifconfig $interface inet $new_ip_address $new_subnet_arg \
$new_broadcast_arg $mtu_arg
@@ -223,7 +223,7 @@
make_resolv_conf
exit_with_hooks 0
fi
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0.0.0.0
exit_with_hooks 1
fi

View File

@ -0,0 +1,186 @@
--- 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.

View File

@ -0,0 +1,14 @@
--- 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

View File

@ -0,0 +1,105 @@
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")) {

View File

@ -0,0 +1,83 @@
--- 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>

View File

@ -0,0 +1,44 @@
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))

View File

@ -0,0 +1,254 @@
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

View File

@ -0,0 +1,12 @@
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,

View File

@ -0,0 +1,77 @@
diff -Nuar --exclude '*.orig' dhcp-3.1.3.orig//client/scripts/linux dhcp-3.1.3//client/scripts/linux
--- dhcp-3.1.3.orig//client/scripts/linux 2010-10-15 04:59:15.890664245 +0000
+++ dhcp-3.1.3//client/scripts/linux 2010-10-15 05:04:57.940396350 +0000
@@ -118,7 +118,7 @@
if [ x$reason = xPREINIT ]; then
if [ x$alias_ip_address != x ]; then
# Bring down alias interface. Its routes will disappear too.
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] )
then
@@ -127,7 +127,7 @@
# 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
+ ifconfig $interface 0.0.0.0 up
fi
# We need to give the kernel some time to get the interface up.
@@ -155,12 +155,12 @@
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
[ x$alias_ip_address != x$old_ip_address ]; then
# Possible new alias. Remove old alias.
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
# IP address changed. Bringing down the interface will delete all routes,
# and clear the ARP cache.
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0.0.0.0
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
@@ -179,7 +179,7 @@
fi
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
then
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
route add -host $alias_ip_address $interface:0
fi
@@ -191,11 +191,11 @@
|| [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
# Turn off alias interface.
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
if [ x$old_ip_address != x ]; then
# Shut down interface, which will delete routes and clear arp cache.
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0.0.0.0
fi
if [ x$alias_ip_address != x ]; then
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
@@ -206,7 +206,7 @@
if [ x$reason = xTIMEOUT ]; then
if [ x$alias_ip_address != x ]; then
- ifconfig $interface:0- inet 0
+ ifconfig $interface:0- inet 0.0.0.0
fi
ifconfig $interface inet $new_ip_address $new_subnet_arg \
$new_broadcast_arg $mtu_arg
@@ -227,7 +227,7 @@
make_resolv_conf
exit_with_hooks 0
fi
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0.0.0.0
exit_with_hooks 1
fi

View File

@ -0,0 +1,216 @@
diff -uNr dhcp-4.0.0.ORIG/client/clparse.c dhcp-4.0.0/client/clparse.c
--- dhcp-4.0.0.ORIG/client/clparse.c 2008-09-01 11:38:51.000000000 +0100
+++ dhcp-4.0.0/client/clparse.c 2008-09-01 11:48:17.000000000 +0100
@@ -37,7 +37,7 @@
struct client_config top_level_config;
-#define NUM_DEFAULT_REQUESTED_OPTS 9
+#define NUM_DEFAULT_REQUESTED_OPTS 10
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
static void parse_client_default_duid(struct parse *cfile);
@@ -98,15 +98,20 @@
dhcp_universe.code_hash, &code, 0, MDL);
/* 8 */
- code = D6O_NAME_SERVERS;
+ code = DHO_NTP_SERVERS;
option_code_hash_lookup(&default_requested_options[7],
- dhcpv6_universe.code_hash, &code, 0, MDL);
+ dhcp_universe.code_hash, &code, 0, MDL);
/* 9 */
- code = D6O_DOMAIN_SEARCH;
+ code = D6O_NAME_SERVERS;
option_code_hash_lookup(&default_requested_options[8],
dhcpv6_universe.code_hash, &code, 0, MDL);
+ /* 10 */
+ code = D6O_DOMAIN_SEARCH;
+ option_code_hash_lookup(&default_requested_options[9],
+ dhcpv6_universe.code_hash, &code, 0, MDL);
+
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
if (default_requested_options[code] == NULL)
log_fatal("Unable to find option definition for "
diff -uNr dhcp-4.0.0.ORIG/client/scripts/bsdos dhcp-4.0.0/client/scripts/bsdos
--- dhcp-4.0.0.ORIG/client/scripts/bsdos 2008-09-01 11:38:51.000000000 +0100
+++ dhcp-4.0.0/client/scripts/bsdos 2008-09-01 11:39:30.000000000 +0100
@@ -29,6 +29,26 @@
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
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 -uNr dhcp-4.0.0.ORIG/client/scripts/freebsd dhcp-4.0.0/client/scripts/freebsd
--- dhcp-4.0.0.ORIG/client/scripts/freebsd 2008-09-01 11:38:51.000000000 +0100
+++ dhcp-4.0.0/client/scripts/freebsd 2008-09-01 11:39:30.000000000 +0100
@@ -73,6 +73,26 @@
fi
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.
diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux
--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-01 11:38:51.000000000 +0100
+++ dhcp-4.0.0/client/scripts/linux 2008-09-01 11:39:30.000000000 +0100
@@ -55,6 +55,26 @@
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
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 -uNr dhcp-4.0.0.ORIG/client/scripts/netbsd dhcp-4.0.0/client/scripts/netbsd
--- dhcp-4.0.0.ORIG/client/scripts/netbsd 2008-09-01 11:38:51.000000000 +0100
+++ dhcp-4.0.0/client/scripts/netbsd 2008-09-01 11:39:30.000000000 +0100
@@ -29,6 +29,26 @@
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
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 -uNr dhcp-4.0.0.ORIG/client/scripts/openbsd dhcp-4.0.0/client/scripts/openbsd
--- dhcp-4.0.0.ORIG/client/scripts/openbsd 2008-09-01 11:38:51.000000000 +0100
+++ dhcp-4.0.0/client/scripts/openbsd 2008-09-01 11:39:30.000000000 +0100
@@ -29,6 +29,26 @@
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
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 -uNr dhcp-4.0.0.ORIG/client/scripts/solaris dhcp-4.0.0/client/scripts/solaris
--- dhcp-4.0.0.ORIG/client/scripts/solaris 2008-09-01 11:38:51.000000000 +0100
+++ dhcp-4.0.0/client/scripts/solaris 2008-09-01 11:39:30.000000000 +0100
@@ -17,6 +17,26 @@
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
+}
+
+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.

View File

@ -0,0 +1,114 @@
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>

View File

@ -0,0 +1,31 @@
ripped from Fedora & tweaked
--- dhcp-4.2.0/omapip/errwarn.c
+++ dhcp-4.2.0/omapip/errwarn.c
@@ -76,20 +76,13 @@
#if !defined (NOMINUM)
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");
- log_error ("requesting help.");
+ log_error ("This version of ISC DHCP is based on the release available");
+ log_error ("on ftp.isc.org. Features have been added and other changes");
+ log_error ("have been made to the base software release in order to make");
+ log_error ("it work better with this distribution.");
log_error ("%s", "");
- log_error ("If you did get this software from ftp.isc.org and have not");
- log_error ("yet read the README, please read it before requesting help.");
- log_error ("If you intend to request help from the dhcp-server@isc.org");
- log_error ("mailing list, please read the section on the README about");
- log_error ("submitting bug reports and requests for help.");
- log_error ("%s", "");
- log_error ("Please do not under any circumstances send requests for");
- log_error ("help directly to the authors of this software - please");
- log_error ("send them to the appropriate mailing list as described in");
- log_error ("the README file.");
+ log_error ("Please report for this software via the Gentoo Bugzilla site:");
+ log_error (" http://bugs.gentoo.org/");
log_error ("%s", "");
log_error ("exiting.");
#endif

View File

@ -0,0 +1,384 @@
--- 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
}

View File

@ -0,0 +1,46 @@
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

View File

@ -0,0 +1,14 @@
bind sets up BUILD_XXX vars for building native tools, but then
doesn't use them for the "gen" tool
--- a/bind/lib/export/dns/Makefile.in
+++ b/bind/lib/export/dns/Makefile.in
@@ -166,7 +166,7 @@
./gen -s ${srcdir} > code.h
gen: ${srcdir}/gen.c
- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS}
+ ${BUILD_CC} ${BUILD_CFLAGS} ${CINCLUDES} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS}
#We don't need rbtdb64 for this library
#rbtdb64.@O@: rbtdb.c

View File

@ -0,0 +1,13 @@
we take care of building this ourselves in the ebuild so
build settings are properly respected
--- dhcp-4.2.2/bind/Makefile
+++ dhcp-4.2.2/bind/Makefile
@@ -29,6 +29,7 @@
bindsrcdir=bind-${version}
all:
+disable:
# Extract the source from the tarball, if it hasn't been already.
@if test -d ${bindsrcdir} ; then \
echo ${bindsrcdir} already unpacked... ; \

View File

@ -0,0 +1,14 @@
fix the bind subdir parallel builds
https://bugs.gentoo.org/380717
--- a/bind/lib/export/isc/Makefile.in
+++ b/bind/lib/export/isc/Makefile.in
@@ -114,6 +114,7 @@
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
+${OBJS}: | subdirs
libisc.@SA@: ${OBJS}
${AR} ${ARFLAGS} $@ ${OBJS}
${RANLIB} $@

View File

@ -0,0 +1,409 @@
--- a/client/scripts/bsdos
+++ b/client/scripts/bsdos
@@ -1,40 +1,46 @@
#!/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
# If the nameserver has a link-local address
# add a <zone_id> (interface name) to it.
case $nameserver in
fe80:*) zone_id="%$interface";;
FE80:*) zone_id="%$interface";;
*) zone_id='';;
esac
- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
+ conf="${conf}nameserver ${nameserver}$zone_id\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
}
--- a/client/scripts/freebsd
+++ b/client/scripts/freebsd
@@ -11,73 +11,45 @@
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
# If the nameserver has a link-local address
# add a <zone_id> (interface name) to it.
case $nameserver in
fe80:*) zone_id="%$interface";;
FE80:*) zone_id="%$interface";;
*) zone_id='';;
esac
- ( echo nameserver ${nameserver}$zone_id >> /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}$zone_id\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
}
--- a/client/scripts/linux
+++ b/client/scripts/linux
@@ -26,44 +26,49 @@
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
shopt -s nocasematch
for nameserver in ${new_dhcp6_name_servers} ; do
# If the nameserver has a link-local address
# add a <zone_id> (interface name) to it.
if [[ "$nameserver" =~ ^fe80:: ]]
then
zone_id="%$interface"
else
zone_id=
fi
- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
+ conf="${conf}nameserver ${nameserver}$zone_id\n"
done
shopt -u nocasematch
+ 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
}
--- a/client/scripts/netbsd
+++ b/client/scripts/netbsd
@@ -1,40 +1,46 @@
#!/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
# If the nameserver has a link-local address
# add a <zone_id> (interface name) to it.
case $nameserver in
fe80:*) zone_id="%$interface";;
FE80:*) zone_id="%$interface";;
*) zone_id='';;
esac
- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
+ conf="${conf}nameserver ${nameserver}$zone_id\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
}
--- a/client/scripts/openbsd
+++ b/client/scripts/openbsd
@@ -1,40 +1,46 @@
#!/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/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
# If the nameserver has a link-local address
# add a <zone_id> (interface name) to it.
case $nameserver in
fe80:*) zone_id="%$interface";;
FE80:*) zone_id="%$interface";;
*) zone_id='';;
esac
- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
+ conf="${conf}nameserver ${nameserver}$zone_id\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
}
--- a/client/scripts/solaris
+++ b/client/scripts/solaris
@@ -1,21 +1,39 @@
#!/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
}

View File

@ -0,0 +1,113 @@
--- dhcp-4.2.2/client/clparse.c
+++ dhcp-4.2.2/client/clparse.c
@@ -182,6 +182,10 @@ isc_result_t read_client_conf ()
#endif
}
+ /* Read any extra configuration from stdin */
+ extern int read_client_conf_stdin (struct interface_info *ip, struct client_config *client);
+ read_client_conf_stdin (NULL, &top_level_config);
+
/* Set up state and config structures for clients that don't
have per-interface configuration statements. */
config = (struct client_config *)0;
@@ -211,23 +215,13 @@ isc_result_t read_client_conf ()
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)
@@ -238,10 +232,74 @@ int read_client_conf_file (const char *name, struct interface_info *ip,
status = (cfile -> warnings_occurred
? DHCP_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>

View File

@ -0,0 +1,46 @@
http://bugs.gentoo.org/265531
--- dhcp-4.2.2/client/scripts/linux
+++ dhcp-4.2.2/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
else
# we haven't changed the address, have we changed other options
# that we wish to update?
@@ -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

View File

@ -0,0 +1,259 @@
diff --git a/common/bpf.c b/common/bpf.c
index b0ef657..8bd5727 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -485,7 +485,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
offset = decode_udp_ip_header (interface,
interface -> rbuf,
interface -> rbuf_offset,
- from, hdr.bh_caplen, &paylen);
+ from, hdr.bh_caplen, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
diff --git a/common/dlpi.c b/common/dlpi.c
index 8f2c73d..b9eb1d3 100644
--- a/common/dlpi.c
+++ b/common/dlpi.c
@@ -693,7 +693,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
length -= offset;
#endif
offset = decode_udp_ip_header (interface, dbuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
/*
* If the IP or UDP checksum was bad, skip the packet...
diff --git a/common/lpf.c b/common/lpf.c
index 16eecc9..4bdb0f1 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -29,19 +29,33 @@
#include "dhcpd.h"
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
#include <sys/ioctl.h>
+#include <sys/socket.h>
#include <sys/uio.h>
#include <errno.h>
#include <asm/types.h>
#include <linux/filter.h>
#include <linux/if_ether.h>
+#include <linux/if_packet.h>
#include <netinet/in_systm.h>
-#include <net/if_packet.h>
#include "includes/netinet/ip.h"
#include "includes/netinet/udp.h"
#include "includes/netinet/if_ether.h"
#include <net/if.h>
+#ifndef PACKET_AUXDATA
+#define PACKET_AUXDATA 8
+
+struct tpacket_auxdata
+{
+ __u32 tp_status;
+ __u32 tp_len;
+ __u32 tp_snaplen;
+ __u16 tp_mac;
+ __u16 tp_net;
+};
+#endif
+
/* Reinitializes the specified interface after an address change. This
is not required for packet-filter APIs. */
@@ -67,10 +81,14 @@ int if_register_lpf (info)
struct interface_info *info;
{
int sock;
- struct sockaddr sa;
+ union {
+ struct sockaddr_ll ll;
+ struct sockaddr common;
+ } sa;
+ struct ifreq ifr;
/* Make an LPF socket. */
- if ((sock = socket(PF_PACKET, SOCK_PACKET,
+ if ((sock = socket(PF_PACKET, SOCK_RAW,
htons((short)ETH_P_ALL))) < 0) {
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
@@ -85,11 +103,16 @@ int if_register_lpf (info)
log_fatal ("Open a socket for LPF: %m");
}
+ memset (&ifr, 0, sizeof ifr);
+ strncpy (ifr.ifr_name, (const char *)info -> ifp, sizeof ifr.ifr_name);
+ if (ioctl (sock, SIOCGIFINDEX, &ifr))
+ log_fatal ("Failed to get interface index: %m");
+
/* Bind to the interface name */
memset (&sa, 0, sizeof sa);
- sa.sa_family = AF_PACKET;
- strncpy (sa.sa_data, (const char *)info -> ifp, sizeof sa.sa_data);
- if (bind (sock, &sa, sizeof sa)) {
+ sa.ll.sll_family = AF_PACKET;
+ sa.ll.sll_ifindex = ifr.ifr_ifindex;
+ if (bind (sock, &sa.common, sizeof sa)) {
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
errno == EAFNOSUPPORT || errno == EINVAL) {
@@ -171,9 +194,18 @@ static void lpf_gen_filter_setup (struct interface_info *);
void if_register_receive (info)
struct interface_info *info;
{
+ int val;
+
/* Open a LPF device and hang it on this interface... */
info -> rfdesc = if_register_lpf (info);
+ val = 1;
+ if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA, &val,
+ sizeof val) < 0) {
+ if (errno != ENOPROTOOPT)
+ log_fatal ("Failed to set auxiliary packet data: %m");
+ }
+
#if defined (HAVE_TR_SUPPORT)
if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
lpf_tr_filter_setup (info);
@@ -295,7 +327,6 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
double hh [16];
double ih [1536 / sizeof (double)];
unsigned char *buf = (unsigned char *)ih;
- struct sockaddr_pkt sa;
int result;
int fudge;
@@ -316,17 +347,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
(unsigned char *)raw, len);
memcpy (buf + ibufp, raw, len);
- /* For some reason, SOCK_PACKET sockets can't be connected,
- so we have to do a sentdo every time. */
- memset (&sa, 0, sizeof sa);
- sa.spkt_family = AF_PACKET;
- strncpy ((char *)sa.spkt_device,
- (const char *)interface -> ifp, sizeof sa.spkt_device);
- sa.spkt_protocol = htons(ETH_P_IP);
-
- result = sendto (interface -> wfdesc,
- buf + fudge, ibufp + len - fudge, 0,
- (const struct sockaddr *)&sa, sizeof sa);
+ result = write (interface -> wfdesc, buf + fudge, ibufp + len - fudge);
if (result < 0)
log_error ("send_packet: %m");
return result;
@@ -343,14 +364,35 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
{
int length = 0;
int offset = 0;
+ int nocsum = 0;
unsigned char ibuf [1536];
unsigned bufix = 0;
unsigned paylen;
-
- length = read (interface -> rfdesc, ibuf, sizeof ibuf);
+ unsigned char cmsgbuf[CMSG_LEN(sizeof(struct tpacket_auxdata))];
+ struct iovec iov = {
+ .iov_base = ibuf,
+ .iov_len = sizeof ibuf,
+ };
+ struct msghdr msg = {
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
+ .msg_control = cmsgbuf,
+ .msg_controllen = sizeof(cmsgbuf),
+ };
+ struct cmsghdr *cmsg;
+
+ length = recvmsg (interface -> rfdesc, &msg, 0);
if (length <= 0)
return length;
+ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+ if (cmsg->cmsg_level == SOL_PACKET &&
+ cmsg->cmsg_type == PACKET_AUXDATA) {
+ struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg);
+ nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY;
+ }
+ }
+
bufix = 0;
/* Decode the physical header... */
offset = decode_hw_header (interface, ibuf, bufix, hfrom);
@@ -367,7 +409,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
- (unsigned)length, &paylen);
+ (unsigned)length, &paylen, nocsum);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff --git a/common/nit.c b/common/nit.c
index 3822206..0da9c36 100644
--- a/common/nit.c
+++ b/common/nit.c
@@ -369,7 +369,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff --git a/common/packet.c b/common/packet.c
index 42bca69..fd2d975 100644
--- a/common/packet.c
+++ b/common/packet.c
@@ -211,7 +211,7 @@ ssize_t
decode_udp_ip_header(struct interface_info *interface,
unsigned char *buf, unsigned bufix,
struct sockaddr_in *from, unsigned buflen,
- unsigned *rbuflen)
+ unsigned *rbuflen, int nocsum)
{
unsigned char *data;
struct ip ip;
@@ -322,7 +322,7 @@ decode_udp_ip_header(struct interface_info *interface,
8, IPPROTO_UDP + ulen))));
udp_packets_seen++;
- if (usum && usum != sum) {
+ if (!nocsum && usum && usum != sum) {
udp_packets_bad_checksum++;
if (udp_packets_seen > 4 &&
(udp_packets_seen / udp_packets_bad_checksum) < 2) {
diff --git a/common/upf.c b/common/upf.c
index feb82a2..fff3949 100644
--- a/common/upf.c
+++ b/common/upf.c
@@ -320,7 +320,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index adf04cc..ded57a9 100644
--- a/includes/dhcpd.h
+++ b/includes/dhcpd.h
@@ -2793,7 +2793,7 @@ ssize_t decode_hw_header (struct interface_info *, unsigned char *,
unsigned, struct hardware *);
ssize_t decode_udp_ip_header (struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,
- unsigned, unsigned *);
+ unsigned, unsigned *, int);
/* ethernet.c */
void assemble_ethernet_header (struct interface_info *, unsigned char *,
--
1.7.3.4

View File

@ -0,0 +1,29 @@
# /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=""

View File

@ -0,0 +1,28 @@
# /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="/var/lib/dhcp/chroot"
# 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=""

View File

@ -0,0 +1,94 @@
#!/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 $?
}

94
net-misc/dhcp/files/dhcpd.init3 Executable file
View File

@ -0,0 +1,94 @@
#!/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 $?
}

113
net-misc/dhcp/files/dhcpd.init4 Executable file
View File

@ -0,0 +1,113 @@
#!/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
}

114
net-misc/dhcp/files/dhcpd.init5 Executable file
View File

@ -0,0 +1,114 @@
#!/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.init5,v 1.1 2011/12/04 22:45:07 vapier Exp $
extra_commands="configtest"
: ${DHCPD_CONF:=/etc/dhcp/${SVCNAME}.conf}
depend() {
need net
use logger dns
}
get_var() {
local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${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
if [ -n "${chroot}" ] ; then
# the config test want's these to exist
mkdir -p \
"${chroot}"/var/run/dhcp \
"${chroot}"/var/lib/dhcp \
"${chroot}"/etc/dhcp
fi
# see comment in get_var() above
if [ ! -f "${chroot}${DHCPD_CONF}" ] ; then
eerror "${chroot}${DHCPD_CONF} does not exist"
return 1
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
}

View File

@ -0,0 +1,13 @@
# /etc/conf.d/dhcrelay: config file for /etc/init.d/dhcrelay
# Configure which interface or interfaces to for dhcrelay to listen on
# and send to.
# List all interfaces space separated. If this is not specified then
# we use all interfaces.
#IFACE=""
# Insert any other options needed. See dhcrelay(8) for details.
#DHCRELAY_OPTS=""
# Space separated list of IPs to forward BOOTP/DHCP packets to.
DHCRELAY_SERVERS=""

View File

@ -0,0 +1,32 @@
#!/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 $?
}

View File

@ -0,0 +1,29 @@
#!/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 $?
}

View File

@ -0,0 +1,34 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init3,v 1.2 2012/05/16 15:57:20 vapier Exp $
depend() {
need net
use logger
}
start() {
if [ -z "${DHCRELAY_SERVERS}" ] ; then
eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}"
return 1
fi
checkpath -d /var/run/dhcp
local iface_opts
if [ -n "${IFACE}" ] ; then
iface_opts=$(printf -- '-i %s ' ${IFACE})
fi
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/dhcrelay \
-- -q ${iface_opts} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --pidfile /var/run/dhcp/${SVCNAME}.pid
eend $?
}

View File

@ -0,0 +1,8 @@
# /etc/conf.d/dhcrelay6: config file for /etc/init.d/dhcrelay6
# Insert any other options needed. See dhcrelay(8) for details.
# Make sure you specify the lower (-l)/upper (-u) interfaces.
DHCRELAY_OPTS="-6 -l lower-iface -u upper-iface"
# Space separated list of IPs to forward BOOTP/DHCP packets to.
DHCRELAY_SERVERS=""

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>base-system</herd>
<longdescription lang="en">The ISC DHCP client/server package.</longdescription>
<longdescription lang="ja">ISC DHCP クライアント/サーバ・パッケージです。</longdescription>
<use>
<flag name='client'>Install the dhclient program</flag>
<flag name='server'>Install the dhcpd and dhcrelay programs</flag>
</use>
</pkgmetadata>