net-misc/dhcp: bump
(Portage version: 2.1.9.24/svn/Linux x86_64, RepoMan options: --force) git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@2721 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
parent
b4d6d94542
commit
28a63827d9
@ -2,6 +2,13 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
|
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.154 2009/05/29 23:30:28 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.154 2009/05/29 23:30:28 vapier Exp $
|
||||||
|
|
||||||
|
*dhcp-4.2.0_p1 (11 Nov 2010)
|
||||||
|
*dhcp-4.1.2 (11 Nov 2010)
|
||||||
|
|
||||||
|
11 Nov 2010; Mario Fetka <mario.fetka@gmail.com> +dhcp-4.1.2.ebuild,
|
||||||
|
+files/dhcp-4.1-dhclient-resolvconf.patch, +dhcp-4.2.0_p1.ebuild:
|
||||||
|
bump
|
||||||
|
|
||||||
26 Aug 2010; Mario Fetka <mario.fetka@gmail.com> +dhcp-3.1.4e.ebuild,
|
26 Aug 2010; Mario Fetka <mario.fetka@gmail.com> +dhcp-3.1.4e.ebuild,
|
||||||
-dhcp-3.1.9999.ebuild:
|
-dhcp-3.1.9999.ebuild:
|
||||||
reneame esv version to the next logical version 3.1.4e
|
reneame esv version to the next logical version 3.1.4e
|
||||||
|
@ -33,6 +33,7 @@ AUX dhcp-4.0.1-dhclient-stdin-conf.patch 2965 RMD160 2c3dd3994f0a7f15f3fe51972dd
|
|||||||
AUX dhcp-4.0.1.ebuild.patch 2605 RMD160 1f1d6a2f087caee59535f0846ddaf3353641e0f0 SHA1 b2157ee25e9770ab61356afaa6939d0cafb7b109 SHA256 a99a2b9a9d17419626cf7442245c04252ed22c4f78d2202932a01b4abbeac251
|
AUX dhcp-4.0.1.ebuild.patch 2605 RMD160 1f1d6a2f087caee59535f0846ddaf3353641e0f0 SHA1 b2157ee25e9770ab61356afaa6939d0cafb7b109 SHA256 a99a2b9a9d17419626cf7442245c04252ed22c4f78d2202932a01b4abbeac251
|
||||||
AUX dhcp-4.0.2-no_isc_blurb-1.patch 2926 RMD160 1834092946267c6e04f737406e5ece4441451e5a SHA1 6666ee124a06b24ae2d33b10620b3f8ac22dda1c SHA256 2baeecda2649004cead2eb5fc4c47a7cf49182d71528d4433c2912cc9486c13f
|
AUX dhcp-4.0.2-no_isc_blurb-1.patch 2926 RMD160 1834092946267c6e04f737406e5ece4441451e5a SHA1 6666ee124a06b24ae2d33b10620b3f8ac22dda1c SHA256 2baeecda2649004cead2eb5fc4c47a7cf49182d71528d4433c2912cc9486c13f
|
||||||
AUX dhcp-4.1-dhclient-metric.patch 7493 RMD160 59131eb3645b80e666b0741324992f10545213e4 SHA1 ec7fedbc46efe882c172eb07613711cccc0bce73 SHA256 405027d4ed4aa4cf8df8e0972c543885f1a2c077483eac6771a58b84bee2a343
|
AUX dhcp-4.1-dhclient-metric.patch 7493 RMD160 59131eb3645b80e666b0741324992f10545213e4 SHA1 ec7fedbc46efe882c172eb07613711cccc0bce73 SHA256 405027d4ed4aa4cf8df8e0972c543885f1a2c077483eac6771a58b84bee2a343
|
||||||
|
AUX dhcp-4.1-dhclient-resolvconf.patch 14948 RMD160 fdff4c3055b543e1c315eb0a3add8d8a89b16f4b SHA1 a4f32e5025b6d995fb50f875346c05b436d744f1 SHA256 5dc9497bce03dd55285924b87ce73546cb3eee96e41de8005bff7dde26dc1d40
|
||||||
AUX dhcp-4.1-no_isc_blurb.patch 2711 RMD160 6b6816756fc899a1bb108281faa4765fcf1d09f7 SHA1 5f010721ee2fd39232fc15ef18faccce6d15e3fe SHA256 c9a17ac6695fa29b016f9dc024b648641b3958ffb2c9740671a9f9c5e8b8e52e
|
AUX dhcp-4.1-no_isc_blurb.patch 2711 RMD160 6b6816756fc899a1bb108281faa4765fcf1d09f7 SHA1 5f010721ee2fd39232fc15ef18faccce6d15e3fe SHA256 c9a17ac6695fa29b016f9dc024b648641b3958ffb2c9740671a9f9c5e8b8e52e
|
||||||
AUX dhcp-4.1.1-no_isc_blurb-1.patch 2871 RMD160 5669a81ac079670ea63d990890cf9d8f021277eb SHA1 7d4ccb64a59940cb9c80bc2d5c8c3bcc282e2c09 SHA256 e827a0b80dee1566edbe75ee8ff896b3efec089f6c518ef8949ada0247aa8957
|
AUX dhcp-4.1.1-no_isc_blurb-1.patch 2871 RMD160 5669a81ac079670ea63d990890cf9d8f021277eb SHA1 7d4ccb64a59940cb9c80bc2d5c8c3bcc282e2c09 SHA256 e827a0b80dee1566edbe75ee8ff896b3efec089f6c518ef8949ada0247aa8957
|
||||||
AUX dhcp-4.2-bpf-nofallback.patch 1553 RMD160 09e3eb3cf2947a60c331becf4f017b10e08436ec SHA1 89a9e09b52b1040df022fced61cbf06aa9b4fbed SHA256 cb667e46ca6700be3c925d5563cc040191208d9aae77402320ff17c018bb7cb0
|
AUX dhcp-4.2-bpf-nofallback.patch 1553 RMD160 09e3eb3cf2947a60c331becf4f017b10e08436ec SHA1 89a9e09b52b1040df022fced61cbf06aa9b4fbed SHA256 cb667e46ca6700be3c925d5563cc040191208d9aae77402320ff17c018bb7cb0
|
||||||
@ -51,6 +52,8 @@ DIST dhcp-4.0.2.tar.gz 1043137 RMD160 7c80370b433de30f89c8e685a939a89e5390ead7 S
|
|||||||
DIST dhcp-4.1.0.tar.gz 1086815 RMD160 bf96fa9d135a65b4d9b27f8caf4f3744f0636c80 SHA1 46e161892140a3b60cd56e62b442f48f51bc605f SHA256 688741e970410efdb177513550f8cd1ee52032eb109313ab316a852f40310914
|
DIST dhcp-4.1.0.tar.gz 1086815 RMD160 bf96fa9d135a65b4d9b27f8caf4f3744f0636c80 SHA1 46e161892140a3b60cd56e62b442f48f51bc605f SHA256 688741e970410efdb177513550f8cd1ee52032eb109313ab316a852f40310914
|
||||||
DIST dhcp-4.1.1-P1.tar.gz 1085414 RMD160 d963e87a24e4dd8f98002577446169773a0b8422 SHA1 e9e756df09502f6666cd79bdf0ab3af0f92b41b0 SHA256 2f640350cbb1966ec3090198c3f128d649a3655f747f96ce910a477fe63263da
|
DIST dhcp-4.1.1-P1.tar.gz 1085414 RMD160 d963e87a24e4dd8f98002577446169773a0b8422 SHA1 e9e756df09502f6666cd79bdf0ab3af0f92b41b0 SHA256 2f640350cbb1966ec3090198c3f128d649a3655f747f96ce910a477fe63263da
|
||||||
DIST dhcp-4.1.1.tar.gz 1084368 RMD160 8b5b7223979c2bf279fe8042ad97680f1d2205fe SHA1 b23a28d481a84248f8170b4c6c1166a86c04b2a6 SHA256 37058685bffbfeb793cfb0867f0b1911f8d238ea69fbaa6cbb165455ab803618
|
DIST dhcp-4.1.1.tar.gz 1084368 RMD160 8b5b7223979c2bf279fe8042ad97680f1d2205fe SHA1 b23a28d481a84248f8170b4c6c1166a86c04b2a6 SHA256 37058685bffbfeb793cfb0867f0b1911f8d238ea69fbaa6cbb165455ab803618
|
||||||
|
DIST dhcp-4.1.2.tar.gz 1092220 RMD160 2616df849354a63ffa269d1e12714f1ee55c3b62 SHA1 99054d38b957a917c9bfb5c135c1d3fe38713093 SHA256 82e0f6627a91990870fddac1a1e8e1e076ddf20981cd03d396199f182a714e29
|
||||||
|
DIST dhcp-4.2.0-P1.tar.gz 8582012 RMD160 d57b68957c200a59052adf4a9706ede9aad97527 SHA1 e4c089d976d73c1e5d15bb6c5aedab1124d61de7 SHA256 5f9c9ea376d3aedbe4c0161176abfe6dbfa649b7f7b2010b8db53f4ff49cc535
|
||||||
DIST dhcp-4.2.0.tar.gz 8581458 RMD160 80665da45cecb7c87ff06fd3b7c806b75f8c1344 SHA1 3cd76d9225d9d8405b02f13660762438d4ad3160 SHA256 6260d43423e4c406ba63cd7199502a395e952b13c80a955026c4b82a4e9d4943
|
DIST dhcp-4.2.0.tar.gz 8581458 RMD160 80665da45cecb7c87ff06fd3b7c806b75f8c1344 SHA1 3cd76d9225d9d8405b02f13660762438d4ad3160 SHA256 6260d43423e4c406ba63cd7199502a395e952b13c80a955026c4b82a4e9d4943
|
||||||
DIST ldap-for-dhcp-3.1.2-2.tar.gz 39752 RMD160 96d2f469b1349485c0202012697222911b81abe8 SHA1 023d12eeb148ad493e252edbfd112d19c9d0cecd SHA256 afd30a30d72a17a4d8ae1a27c247711f03b30b5e270bdcf9f521695b55b28db7
|
DIST ldap-for-dhcp-3.1.2-2.tar.gz 39752 RMD160 96d2f469b1349485c0202012697222911b81abe8 SHA1 023d12eeb148ad493e252edbfd112d19c9d0cecd SHA256 afd30a30d72a17a4d8ae1a27c247711f03b30b5e270bdcf9f521695b55b28db7
|
||||||
DIST ldap-for-dhcp-3.1.3-1.tar.gz 41029 RMD160 8b3793f6f6db956fd9c2d6b1ea94e8bd040d188b SHA1 e8053dac00e04fa27ebe90260e78a7d37da21ec7 SHA256 4df0daf50ddc31eb3cfd7c31226ac3d766fb37884f80fc6b96f3c3ee4a94baab
|
DIST ldap-for-dhcp-3.1.3-1.tar.gz 41029 RMD160 8b3793f6f6db956fd9c2d6b1ea94e8bd040d188b SHA1 e8053dac00e04fa27ebe90260e78a7d37da21ec7 SHA256 4df0daf50ddc31eb3cfd7c31226ac3d766fb37884f80fc6b96f3c3ee4a94baab
|
||||||
@ -67,6 +70,8 @@ EBUILD dhcp-4.0.2.ebuild 7071 RMD160 e458c6fafeeede68f7897181b2152489844fe843 SH
|
|||||||
EBUILD dhcp-4.1.0.ebuild 7488 RMD160 951457f2b70458c38d82c5013e8e6287ab0353fb SHA1 d96c3ebd090b6def031e79d8902b2c87e303167a SHA256 ec25fa7569f92d9dac230e85702427d37d51981d50033667ce36ccfe7be0620a
|
EBUILD dhcp-4.1.0.ebuild 7488 RMD160 951457f2b70458c38d82c5013e8e6287ab0353fb SHA1 d96c3ebd090b6def031e79d8902b2c87e303167a SHA256 ec25fa7569f92d9dac230e85702427d37d51981d50033667ce36ccfe7be0620a
|
||||||
EBUILD dhcp-4.1.1.ebuild 7028 RMD160 e749ceb20ce4ec53319a5c0b2eb51fbd1a9f6da0 SHA1 f24922e252a1a9dad9972cbabd6aaf88308f4797 SHA256 d4ca9c44e344189290decb3da8375a834b496730f06d59545af19f95bd102e03
|
EBUILD dhcp-4.1.1.ebuild 7028 RMD160 e749ceb20ce4ec53319a5c0b2eb51fbd1a9f6da0 SHA1 f24922e252a1a9dad9972cbabd6aaf88308f4797 SHA256 d4ca9c44e344189290decb3da8375a834b496730f06d59545af19f95bd102e03
|
||||||
EBUILD dhcp-4.1.1_p1.ebuild 6969 RMD160 231066d0ebb33ea454f0874566234080073d5f72 SHA1 b90be96d283dbd983ea67efabbe545380a03fb7a SHA256 f115cdfdf85996d94cab0b30343a474f8a74fc3c31607798e246e42dc249cce6
|
EBUILD dhcp-4.1.1_p1.ebuild 6969 RMD160 231066d0ebb33ea454f0874566234080073d5f72 SHA1 b90be96d283dbd983ea67efabbe545380a03fb7a SHA256 f115cdfdf85996d94cab0b30343a474f8a74fc3c31607798e246e42dc249cce6
|
||||||
|
EBUILD dhcp-4.1.2.ebuild 6856 RMD160 ec3861378f32cca77c68fbbb0886a98129a49399 SHA1 3f0054016582149be39a5f5f2fbaffd96d420a3b SHA256 13a95298e1e54d623ff5769228a94fcc533bc59c961e3fae77c318d2978da006
|
||||||
EBUILD dhcp-4.2.0.ebuild 6446 RMD160 ef04d42aae30a41e75b020cce55c29ba7f9308b6 SHA1 d8fda6cb3428cec028d1d1b1f879cbbf97440d88 SHA256 d49b721691f80d55616404d2f47b069a5af04b86664d39a16dda983a03f273e9
|
EBUILD dhcp-4.2.0.ebuild 6446 RMD160 ef04d42aae30a41e75b020cce55c29ba7f9308b6 SHA1 d8fda6cb3428cec028d1d1b1f879cbbf97440d88 SHA256 d49b721691f80d55616404d2f47b069a5af04b86664d39a16dda983a03f273e9
|
||||||
MISC ChangeLog 30465 RMD160 c5c8468449aebb43eaf97240d410bb20da4caec7 SHA1 dd9ea37a59ca0b05bde4d5106dcc781d024180bf SHA256 fd70027ed65c7acbf88fc7b9fce6de324c171cb78f569c2ce4840f9c88985ea8
|
EBUILD dhcp-4.2.0_p1.ebuild 6470 RMD160 3cb152aa2e9b374a3785bb662689e2c29b090af6 SHA1 47df78414167bd0a19c8dd8f18a7758ce631fdd1 SHA256 3d5faddc64f8e088c65ec82f5453f0ef18c2f5c2ee254098a726672f215fecda
|
||||||
|
MISC ChangeLog 30668 RMD160 79229d6c708d68c5de4eb882d37816533a62ad9d SHA1 1225df381f34b5e1d5a77c270b0d7294534a426e SHA256 9b234ec287f15b68bf77fe19fcf9632ad7b99094f7b6c1b1761035ce758dac8f
|
||||||
MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415
|
MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415
|
||||||
|
223
net-misc/dhcp/dhcp-4.1.2.ebuild
Normal file
223
net-misc/dhcp/dhcp-4.1.2.ebuild
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
# Copyright 1999-2010 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||||
|
|
||||||
|
inherit eutils flag-o-matic autotools
|
||||||
|
|
||||||
|
LDAP_PV="4.1.1-2"
|
||||||
|
|
||||||
|
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}"
|
||||||
|
MY_LDAP_PV="${LDAP_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
|
||||||
|
http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.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 ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||||
|
|
||||||
|
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 ) )"
|
||||||
|
|
||||||
|
PROVIDE="virtual/dhcpc"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
unpack ${A}
|
||||||
|
cd "${S}"
|
||||||
|
|
||||||
|
# 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.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
|
||||||
|
# Quiet the isc blurb
|
||||||
|
epatch "${FILESDIR}/${PN}"-4.1.1-no_isc_blurb-1.patch
|
||||||
|
# Enable dhclient to get extra configuration from stdin
|
||||||
|
epatch "${FILESDIR}/${PN}"-4.0.1-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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Ldap patch for dhcp
|
||||||
|
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||||
|
|
||||||
|
# Brand the version with Gentoo
|
||||||
|
# include revision if >0
|
||||||
|
local newver="Gentoo"
|
||||||
|
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||||
|
|
||||||
|
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||||
|
configure.ac || 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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
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-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||||
|
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||||
|
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||||
|
$(use_enable ipv6 dhcpv6) \
|
||||||
|
$(use_with ldap) \
|
||||||
|
$(use_with ssl ldapcrypto) \
|
||||||
|
|| die
|
||||||
|
|
||||||
|
emake || die "compile problem"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||||
|
cd "${S}/${installdir}"
|
||||||
|
if [ "${installdir}" == client ]; then
|
||||||
|
make install DESTDIR="${D}" exec_prefix="" || die
|
||||||
|
else
|
||||||
|
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
|
||||||
|
exeinto /sbin
|
||||||
|
if use kernel_linux; then
|
||||||
|
newexe "${S}"/client/scripts/linux dhclient-script
|
||||||
|
else
|
||||||
|
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use doc; then
|
||||||
|
dodoc README RELNOTES doc/*
|
||||||
|
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||||
|
fi
|
||||||
|
insinto /etc/dhcp
|
||||||
|
newins client/dhclient.conf dhclient.conf.sample
|
||||||
|
keepdir /var/{lib,run}/dhcp
|
||||||
|
keepdir /var/lib/dhclient
|
||||||
|
|
||||||
|
# Install our server files
|
||||||
|
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
|
||||||
|
|
||||||
|
# install ldap files
|
||||||
|
if use ldap; then
|
||||||
|
insinto /etc/openldap/schema
|
||||||
|
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||||
|
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# We never want portage to own this file
|
||||||
|
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() {
|
||||||
|
enewgroup dhcp
|
||||||
|
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
216
net-misc/dhcp/dhcp-4.2.0_p1.ebuild
Normal file
216
net-misc/dhcp/dhcp-4.2.0_p1.ebuild
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
# Copyright 1999-2010 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||||
|
|
||||||
|
inherit eutils flag-o-matic autotools
|
||||||
|
|
||||||
|
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 ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||||
|
|
||||||
|
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 ) )"
|
||||||
|
|
||||||
|
|
||||||
|
PROVIDE="virtual/dhcpc"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
unpack ${A}
|
||||||
|
cd "${S}"
|
||||||
|
|
||||||
|
# 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.0-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
|
||||||
|
# Quiet the isc blurb
|
||||||
|
epatch "${FILESDIR}/${PN}"-4.2-no_isc_blurb.patch
|
||||||
|
# Enable dhclient to get extra configuration from stdin
|
||||||
|
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||||
|
# Disable fallback interfaces when using BPF
|
||||||
|
# This allows more than one dhclient instance on the BSD's
|
||||||
|
epatch "${FILESDIR}/${PN}"-4.2-bpf-nofallback.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
|
||||||
|
|
||||||
|
# Brand the version with Gentoo
|
||||||
|
# include revision if >0
|
||||||
|
local newver="Gentoo"
|
||||||
|
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||||
|
|
||||||
|
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||||
|
configure.ac || 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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
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-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||||
|
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||||
|
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||||
|
$(use_enable ipv6 dhcpv6) \
|
||||||
|
$(use_with ldap) \
|
||||||
|
$(use_with ssl ldapcrypto) \
|
||||||
|
|| die
|
||||||
|
|
||||||
|
emake || die "compile problem"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||||
|
cd "${S}/${installdir}"
|
||||||
|
if [ "${installdir}" == client ]; then
|
||||||
|
make install DESTDIR="${D}" exec_prefix="" || die
|
||||||
|
else
|
||||||
|
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
|
||||||
|
exeinto /sbin
|
||||||
|
if use kernel_linux; then
|
||||||
|
newexe "${S}"/client/scripts/linux dhclient-script
|
||||||
|
else
|
||||||
|
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use doc; then
|
||||||
|
dodoc README RELNOTES doc/*
|
||||||
|
use ldap && dodoc "contrib/ldap"/*.ldap
|
||||||
|
fi
|
||||||
|
insinto /etc/dhcp
|
||||||
|
newins client/dhclient.conf dhclient.conf.sample
|
||||||
|
keepdir /var/{lib,run}/dhcp
|
||||||
|
keepdir /var/lib/dhclient
|
||||||
|
|
||||||
|
# Install our server files
|
||||||
|
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
|
||||||
|
|
||||||
|
# install ldap files
|
||||||
|
if use ldap; then
|
||||||
|
insinto /etc/openldap/schema
|
||||||
|
doins "contrib/ldap"/dhcp.*
|
||||||
|
dosbin "contrib/ldap"/dhcpd-conf-to-ldap
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# We never want portage to own this file
|
||||||
|
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() {
|
||||||
|
enewgroup dhcp
|
||||||
|
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
395
net-misc/dhcp/files/dhcp-4.1-dhclient-resolvconf.patch
Normal file
395
net-misc/dhcp/files/dhcp-4.1-dhclient-resolvconf.patch
Normal file
@ -0,0 +1,395 @@
|
|||||||
|
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
|
||||||
|
Date: 2010-11-11
|
||||||
|
Initial Package Version: 4.1.2
|
||||||
|
Origin: gentoo dhcp-4.0-dhclient-resolvconf.patch
|
||||||
|
Upstream Status: unknown
|
||||||
|
Description: add dhconfig resolveconf support
|
||||||
|
|
||||||
|
diff -Naur dhcp-4.1.2.orig/client/scripts/bsdos dhcp-4.1.2/client/scripts/bsdos
|
||||||
|
--- dhcp-4.1.2.orig/client/scripts/bsdos 2010-11-11 19:44:00.000000000 +0000
|
||||||
|
+++ dhcp-4.1.2/client/scripts/bsdos 2010-11-11 19:44:06.000000000 +0000
|
||||||
|
@@ -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
|
||||||
|
}
|
||||||
|
diff -Naur dhcp-4.1.2.orig/client/scripts/freebsd dhcp-4.1.2/client/scripts/freebsd
|
||||||
|
--- dhcp-4.1.2.orig/client/scripts/freebsd 2010-11-11 19:44:00.000000000 +0000
|
||||||
|
+++ dhcp-4.1.2/client/scripts/freebsd 2010-11-11 19:44:06.000000000 +0000
|
||||||
|
@@ -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
|
||||||
|
}
|
||||||
|
diff -Naur dhcp-4.1.2.orig/client/scripts/linux dhcp-4.1.2/client/scripts/linux
|
||||||
|
--- dhcp-4.1.2.orig/client/scripts/linux 2010-11-11 19:44:00.000000000 +0000
|
||||||
|
+++ dhcp-4.1.2/client/scripts/linux 2010-11-11 19:44:06.000000000 +0000
|
||||||
|
@@ -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
|
||||||
|
}
|
||||||
|
diff -Naur dhcp-4.1.2.orig/client/scripts/netbsd dhcp-4.1.2/client/scripts/netbsd
|
||||||
|
--- dhcp-4.1.2.orig/client/scripts/netbsd 2010-11-11 19:44:00.000000000 +0000
|
||||||
|
+++ dhcp-4.1.2/client/scripts/netbsd 2010-11-11 19:44:40.000000000 +0000
|
||||||
|
@@ -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"$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
|
||||||
|
- 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
|
||||||
|
}
|
||||||
|
diff -Naur dhcp-4.1.2.orig/client/scripts/openbsd dhcp-4.1.2/client/scripts/openbsd
|
||||||
|
--- dhcp-4.1.2.orig/client/scripts/openbsd 2010-11-11 19:44:00.000000000 +0000
|
||||||
|
+++ dhcp-4.1.2/client/scripts/openbsd 2010-11-11 19:44:06.000000000 +0000
|
||||||
|
@@ -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
|
||||||
|
}
|
||||||
|
diff -Naur dhcp-4.1.2.orig/client/scripts/solaris dhcp-4.1.2/client/scripts/solaris
|
||||||
|
--- dhcp-4.1.2.orig/client/scripts/solaris 2010-11-11 19:44:00.000000000 +0000
|
||||||
|
+++ dhcp-4.1.2/client/scripts/solaris 2010-11-11 19:44:06.000000000 +0000
|
||||||
|
@@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user