summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-03-22 17:49:30 +0000
committerRoy Marples <uberlord@gentoo.org>2006-03-22 17:49:30 +0000
commitbd10f2bdfefe742a4ba9ece1d943bf2c48ea7d64 (patch)
treefd4a8e19a7b98b9d114832726084e878af36d0e9 /net-misc/dhcp
parentopal useflags (diff)
downloadhistorical-bd10f2bdfefe742a4ba9ece1d943bf2c48ea7d64.tar.gz
historical-bd10f2bdfefe742a4ba9ece1d943bf2c48ea7d64.tar.bz2
historical-bd10f2bdfefe742a4ba9ece1d943bf2c48ea7d64.zip
Tweaked patchset to apply cleanly.
Support PEER_DNS and PEER_NTP options. Package-Manager: portage-2.1_pre6-r5
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r--net-misc/dhcp/ChangeLog11
-rw-r--r--net-misc/dhcp/Manifest54
-rw-r--r--net-misc/dhcp/dhcp-3.0.3-r6.ebuild6
-rw-r--r--net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild6
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch18
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch34
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch36
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch171
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch292
9 files changed, 282 insertions, 346 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index f8b2fa80ad7f..2b856f0d938e 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-misc/dhcp
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.85 2006/03/21 19:26:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.86 2006/03/22 17:49:30 uberlord Exp $
+
+ 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:
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 591a893dff37..fb4deb93781d 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,18 +1,18 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 aef1129b49f09df9418d93dbf52b6acc ChangeLog 15123
-RMD160 287b0aae2e8291b7de6ee70ec225c76637610d5b ChangeLog 15123
-SHA256 947bfd953ee4611ce08b67b520295774f627630e4441c64848217b9fb688af9d ChangeLog 15123
+MD5 ac78d50c0f394388e4c68d5437e00927 ChangeLog 15510
+RMD160 da8ff82dff0b28a250c5d7b1aed27a03088eda36 ChangeLog 15510
+SHA256 b5b882134ef7b58dd444a40db22187147ec58bd6abd879a3e07b6775ad2b389c ChangeLog 15510
MD5 b268712b328548de32d5db06619787a8 dhcp-3.0.3-r4.ebuild 4062
RMD160 310de76cfa0feff02e9620ed113e5c2647b3b8c8 dhcp-3.0.3-r4.ebuild 4062
SHA256 a2083988469dbf8795387c94da9cff44b8f2dadf89048b32f261954dae3a434a dhcp-3.0.3-r4.ebuild 4062
-MD5 5d32e7c8a9bb651f9479471c309b58dd dhcp-3.0.3-r6.ebuild 6003
-RMD160 59b6f6e0e6b5c30b0736ecdc571bdf78eeb0ddbd dhcp-3.0.3-r6.ebuild 6003
-SHA256 32d2019a99e8fb06b3349aa3b649e3b0b587337224799f0269704c40eab825f2 dhcp-3.0.3-r6.ebuild 6003
-MD5 b738e009daa432f38319e7a8c38b5b27 dhcp-3.0.4_beta3-r1.ebuild 5942
-RMD160 ee9264589d447a407938f42e3a43533037f32488 dhcp-3.0.4_beta3-r1.ebuild 5942
-SHA256 00c628ff918a945677cf49f04716155191da9d2f483d0ade8a64942f6e3f7bd6 dhcp-3.0.4_beta3-r1.ebuild 5942
+MD5 d241b680e84ec234b54acec298e4f353 dhcp-3.0.3-r6.ebuild 6002
+RMD160 edb37b6a08b5ffc912ab4fabd6180ac84733e9e4 dhcp-3.0.3-r6.ebuild 6002
+SHA256 d1b377499396d182e6365b0c1b384a9a0d0e54810b6518f0788ed748d458508d dhcp-3.0.3-r6.ebuild 6002
+MD5 383e620a1e300e35162d2e217a98337d dhcp-3.0.4_beta3-r1.ebuild 5941
+RMD160 c493fcdc244c207b6b85bf1f14285d4f89b89571 dhcp-3.0.4_beta3-r1.ebuild 5941
+SHA256 604248da38355cf3ebc4276d3c321cb1cdde510d72e62e799d892e7dab6445f7 dhcp-3.0.4_beta3-r1.ebuild 5941
MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0-fix-perms.patch 485
RMD160 3857270dffed5feee95609aeb37d0c9ef8844945 files/dhcp-3.0-fix-perms.patch 485
SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018 files/dhcp-3.0-fix-perms.patch 485
@@ -22,21 +22,21 @@ SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae files/dh
MD5 d0f61288e81ce020573f3f6965af8489 files/dhcp-3.0.2-gmake.patch 1872
RMD160 d2d41c0a7e002103d68605d2492bfe716bb2889e files/dhcp-3.0.2-gmake.patch 1872
SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215 files/dhcp-3.0.2-gmake.patch 1872
-MD5 3b6c17bf8f6a7a0f1c94c01fd792ef42 files/dhcp-3.0.3-dhclient-hostname.patch 1046
-RMD160 ffedf6a9b77f1611817b08205cbf1e83ee6f8f5e files/dhcp-3.0.3-dhclient-hostname.patch 1046
-SHA256 4a2e48efbb569b66f834b3786aafd6ecec559083cc61de51305577c169032aa4 files/dhcp-3.0.3-dhclient-hostname.patch 1046
-MD5 a69b724bebeef3eac81a55a7eec0b009 files/dhcp-3.0.3-dhclient-metric.patch 6566
-RMD160 3e2ada92dafac90f8b9f40410b9f456dc5df5cbf files/dhcp-3.0.3-dhclient-metric.patch 6566
-SHA256 64fcf085b6f5a340ca5be50315e5458916eceac15affb115c8ec7d146330e91a files/dhcp-3.0.3-dhclient-metric.patch 6566
-MD5 0a677f9881e593716755bdd0238a5d1e files/dhcp-3.0.3-dhclient-mtu.patch 6469
-RMD160 8d18d120d8514cb9b4d000ebb767a60e57091c42 files/dhcp-3.0.3-dhclient-mtu.patch 6469
-SHA256 ad887de2ace0e4aea321ddc262b467a0c810b8b6a34d3e1cad30906a2840600a files/dhcp-3.0.3-dhclient-mtu.patch 6469
-MD5 0c9596d1fbd7ce8c71d4dc76f0553f6c files/dhcp-3.0.3-dhclient-ntp.patch 5340
-RMD160 7f72e52af2a6e9d646655020e512133af1e13bf0 files/dhcp-3.0.3-dhclient-ntp.patch 5340
-SHA256 768fb750df7c888194231a3090b0c1929cbd51490d3e9ff5515e0a0cbb776f55 files/dhcp-3.0.3-dhclient-ntp.patch 5340
-MD5 7d82e43495de039f315e2904d4c0fc57 files/dhcp-3.0.3-dhclient-resolvconf.patch 8327
-RMD160 4d8758622ad6b2f97d76a22b290f6a11b3c0b2ca files/dhcp-3.0.3-dhclient-resolvconf.patch 8327
-SHA256 0322f8cb3a0e06d2d824bb42b0a3f5f46d1d917c0d30b83f5981043825c4a50b files/dhcp-3.0.3-dhclient-resolvconf.patch 8327
+MD5 dbd178c799c96e5b9720f09079cf74f9 files/dhcp-3.0.3-dhclient-hostname.patch 390
+RMD160 426f6e8f1bab18f1c870c50acaed2efe2cb9330e files/dhcp-3.0.3-dhclient-hostname.patch 390
+SHA256 fd7f234ffe55a0a701a490e5632e64c5b0091ad83a7b64178d0da0039d3ed914 files/dhcp-3.0.3-dhclient-hostname.patch 390
+MD5 ce6d16f53a6f0308c57e12f541450170 files/dhcp-3.0.3-dhclient-metric.patch 6568
+RMD160 15ab7cfb108aabb2c170e9cb796ed310675bf198 files/dhcp-3.0.3-dhclient-metric.patch 6568
+SHA256 1a2887e6f644bb3e9ab5bf35631f0ebb71300fe66405db5454c0a193aa20299b files/dhcp-3.0.3-dhclient-metric.patch 6568
+MD5 ff7ec994964b5a0b8f0c03b86eedbe22 files/dhcp-3.0.3-dhclient-mtu.patch 6471
+RMD160 7ff0e447976f652e765de10ec74012b19cb35961 files/dhcp-3.0.3-dhclient-mtu.patch 6471
+SHA256 44bd303721baa85f582530689b10d6615a467bf5e992cc48bc9c33aa7d962415 files/dhcp-3.0.3-dhclient-mtu.patch 6471
+MD5 3eab8a40f0a84d3b2d9d406fa4b687c0 files/dhcp-3.0.3-dhclient-ntp.patch 5868
+RMD160 41522438308fc8b82dc298752192d1c77b4c26aa files/dhcp-3.0.3-dhclient-ntp.patch 5868
+SHA256 751fdfa0b36eab386f4029284d61c0c2b41b3135878738caa02e512999f2ca65 files/dhcp-3.0.3-dhclient-ntp.patch 5868
+MD5 893c47e09146c07511fc583d4e79db92 files/dhcp-3.0.3-dhclient-resolvconf.patch 6637
+RMD160 503b6f57d96a35c720f4b06f0805cac759ddbe23 files/dhcp-3.0.3-dhclient-resolvconf.patch 6637
+SHA256 f63a89f0954724a5b06785ecd712cfdb45901808c1f9dd8483a00fbb79c01106 files/dhcp-3.0.3-dhclient-resolvconf.patch 6637
MD5 d81606fd8cdd2376018c6466fe9cf0ef files/dhcp-3.0.3-dhclient-stdin-conf.patch 1948
RMD160 42f32a5bbfe2a937827c2972ef84cfa78c2c401c files/dhcp-3.0.3-dhclient-stdin-conf.patch 1948
SHA256 e1bfd26b7da10acc4bd718e35aae4235308abcacde78dedf39533b11ab18b3ae files/dhcp-3.0.3-dhclient-stdin-conf.patch 1948
@@ -85,7 +85,7 @@ SHA256 456ab9c26235fa4c1eda6b53b163e901869d5f64ba442b30db1fe86c57fe56af metadata
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
-iD8DBQFEIFMoAiZjviIA2XgRAiUIAJ490LWUKxWwszRIuHYeHBw6j89ScgCg3E01
-abd6AWDnmM/g/CNd+QwlIQQ=
-=CdH0
+iD8DBQFEIY5IEbVyYKaZ/NERAniMAKCD38J7kp8Djjx4JRsV75DQmy00lQCgi7UA
+A8hNXqp3ctuZv+74bJRuzZk=
+=YSD6
-----END PGP SIGNATURE-----
diff --git a/net-misc/dhcp/dhcp-3.0.3-r6.ebuild b/net-misc/dhcp/dhcp-3.0.3-r6.ebuild
index a2ad00208f23..ae86af3f1c85 100644
--- a/net-misc/dhcp/dhcp-3.0.3-r6.ebuild
+++ b/net-misc/dhcp/dhcp-3.0.3-r6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.3-r6.ebuild,v 1.4 2006/03/21 19:26:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.3-r6.ebuild,v 1.5 2006/03/22 17:49:30 uberlord Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -35,11 +35,11 @@ src_unpack() {
epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch"
# Enable dhclient to equery NTP servers
epatch "${FILESDIR}/${PN}-3.0.3-dhclient-ntp.patch"
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
# Allow dhclient to use IF_METRIC to set route metrics
# Also, stop doing ifconfig down on Linux as that kills wpa_supplicant
epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch"
- # resolvconf support in dhclient-script
- epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
# Fix setting hostnames on Linux
epatch "${FILESDIR}/${PN}-3.0.3-dhclient-hostname.patch"
# Allow mtu settings
diff --git a/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild b/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild
index 28e71e6fb909..dfaa48bfa532 100644
--- a/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild
+++ b/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild,v 1.4 2006/03/21 19:26:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild,v 1.5 2006/03/22 17:49:30 uberlord Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -35,11 +35,11 @@ src_unpack() {
epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch"
# Enable dhclient to equery NTP servers
epatch "${FILESDIR}/${PN}-3.0.3-dhclient-ntp.patch"
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
# Allow dhclient to use IF_METRIC to set route metrics
# Also, stop doing ifconfig down on Linux as that kills wpa_supplicant
epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch"
- # resolvconf support in dhclient-script
- epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
# Fix setting hostnames on Linux
epatch "${FILESDIR}/${PN}-3.0.3-dhclient-hostname.patch"
# Allow mtu settings
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch
index de5b2e2abff6..a44f542bf308 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch
@@ -1,18 +1,6 @@
-diff -ru /tmp/client/scripts/bsdos client/scripts/bsdos
---- /tmp/client/scripts/bsdos 2006-03-21 10:54:43.311983617 +0000
-+++ client/scripts/bsdos 2006-03-21 10:55:46.000000000 +0000
-@@ -106,6 +106,7 @@
- [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
- current_hostname=`hostname`
- if [ x$current_hostname = x ] || \
-+ [ x$current_hostname = "x(none)" ] || \
- [ x$current_hostname = x$old_host_name ]; then
- if [ x$current_hostname = x ] || \
- [ x$new_host_name != x$old_host_name ]; then
-diff -ru /tmp/client/scripts/linux client/scripts/linux
---- /tmp/client/scripts/linux 2006-03-21 10:54:43.295982093 +0000
-+++ client/scripts/linux 2006-03-21 10:54:58.000000000 +0000
-@@ -137,6 +137,7 @@
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -141,6 +141,7 @@
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
current_hostname=`hostname`
if [ x$current_hostname = x ] || \
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
index e7366836f264..50a08fa4d96a 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
@@ -1,6 +1,6 @@
--- client/scripts/bsdos
+++ client/scripts/bsdos
-@@ -68,6 +68,9 @@
+@@ -81,6 +81,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -10,7 +10,7 @@
if [ x$reason = xMEDIUM ]; then
eval "ifconfig $interface $medium"
-@@ -128,7 +128,7 @@
+@@ -141,7 +141,7 @@
$new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
@@ -19,7 +19,7 @@
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
-@@ -194,7 +194,7 @@
+@@ -207,7 +207,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
@@ -30,7 +30,7 @@
while [ $# -gt 1 ]; do
--- client/scripts/freebsd
+++ client/scripts/freebsd
-@@ -92,6 +92,9 @@
+@@ -91,6 +91,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -40,7 +40,7 @@
if [ x$reason = xMEDIUM ]; then
eval "ifconfig $interface $medium"
-@@ -158,7 +158,7 @@
+@@ -157,7 +157,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
@@ -49,7 +49,7 @@
done
if [ -n "$new_static_routes" ]; then
$LOGGER "New Static Routes: $new_static_routes"
-@@ -229,7 +229,7 @@
+@@ -228,7 +228,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
@@ -60,7 +60,7 @@
while [ $# -gt 1 ]; do
--- client/scripts/linux
+++ client/scripts/linux
-@@ -91,6 +91,9 @@
+@@ -103,6 +103,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -70,7 +70,7 @@
if [ x$reason = xMEDIUM ]; then
# Linux doesn't do mediums (ok, ok, media).
-@@ -136,13 +136,11 @@
+@@ -148,13 +148,11 @@
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.
@@ -87,7 +87,7 @@
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
-@@ -155,14 +153,14 @@
+@@ -167,14 +165,14 @@
route add -net $new_network_number $new_subnet_arg dev $interface
fi
for router in $new_routers; do
@@ -104,7 +104,7 @@
fi
make_resolv_conf
exit_with_hooks 0
-@@ -175,12 +173,12 @@
+@@ -187,12 +185,12 @@
ifconfig $interface:0- inet 0
fi
if [ x$old_ip_address != x ]; then
@@ -120,7 +120,7 @@
fi
exit_with_hooks 0
fi
-@@ -201,15 +199,15 @@
+@@ -213,15 +211,15 @@
fi
if [ $relmajor -lt 2 ] || \
( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
@@ -141,7 +141,7 @@
--- client/scripts/netbsd
+++ client/scripts/netbsd
-@@ -68,6 +68,9 @@
+@@ -81,6 +81,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -151,7 +151,7 @@
if [ x$reason = xMEDIUM ]; then
eval "ifconfig $interface $medium"
-@@ -128,7 +128,7 @@
+@@ -141,7 +141,7 @@
$new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
@@ -160,7 +160,7 @@
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
-@@ -194,7 +194,7 @@
+@@ -207,7 +207,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
@@ -171,7 +171,7 @@
while [ $# -gt 1 ]; do
--- client/scripts/openbsd
+++ client/scripts/openbsd
-@@ -68,6 +68,9 @@
+@@ -81,6 +81,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -181,7 +181,7 @@
if [ x$reason = xMEDIUM ]; then
eval "ifconfig $interface $medium"
-@@ -128,7 +128,7 @@
+@@ -141,7 +141,7 @@
$new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
@@ -190,7 +190,7 @@
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
-@@ -194,7 +194,7 @@
+@@ -207,7 +207,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch
index e9b7c477a6d5..576027ad5a09 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch
@@ -1,6 +1,6 @@
--- client/scripts/bsdos
+++ client/scripts/bsdos
-@@ -77,6 +77,9 @@
+@@ -81,6 +81,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -10,7 +10,7 @@
if [ x$IF_METRIC != x ]; then
metric_arg="metric $IF_METRIC"
fi
-@@ -138,7 +141,7 @@
+@@ -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 \
@@ -19,7 +19,7 @@
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router $metric_arg dev $interface >/dev/null 2>&1
-@@ -196,7 +199,7 @@
+@@ -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 \
@@ -30,7 +30,7 @@
set $new_routers
--- client/scripts/freebsd
+++ client/scripts/freebsd
-@@ -86,6 +86,9 @@
+@@ -91,6 +91,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -40,7 +40,7 @@
if [ x$IF_METRIC != x ]; then
metric_arg="metric $IF_METRIC"
fi
-@@ -146,7 +149,7 @@
+@@ -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 \
@@ -49,7 +49,7 @@
$LOGGER "New IP Address ($interface): $new_ip_address"
$LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
$LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
-@@ -211,7 +214,7 @@
+@@ -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 \
@@ -60,7 +60,7 @@
$LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
--- client/scripts/linux
+++ client/scripts/linux
-@@ -99,6 +99,9 @@
+@@ -103,6 +103,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -70,7 +70,7 @@
if [ x$IF_METRIC != x ]; then
metric_arg="metric $IF_METRIC"
fi
-@@ -158,7 +161,7 @@
+@@ -162,7 +165,7 @@
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
ifconfig $interface inet $new_ip_address $new_subnet_arg \
@@ -79,7 +79,7 @@
# Add a network route to the computed network address.
if [ $relmajor -lt 2 ] || \
( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
-@@ -201,7 +204,7 @@
+@@ -204,7 +207,7 @@
ifconfig $interface:0- inet 0
fi
ifconfig $interface inet $new_ip_address $new_subnet_arg \
@@ -90,7 +90,7 @@
if ping -q -c 1 $1; then
--- client/scripts/netbsd
+++ client/scripts/netbsd
-@@ -77,6 +77,9 @@
+@@ -81,6 +81,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -100,7 +100,7 @@
if [ x$IF_METRIC != x ]; then
metric_arg="metric $IF_METRIC"
fi
-@@ -137,7 +140,7 @@
+@@ -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 \
@@ -109,7 +109,7 @@
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router $metric_arg dev $interface >/dev/null 2>&1
-@@ -195,7 +198,7 @@
+@@ -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 \
@@ -120,7 +120,7 @@
set $new_routers
--- client/scripts/openbsd
+++ client/scripts/openbsd
-@@ -77,6 +77,9 @@
+@@ -81,6 +81,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -130,7 +130,7 @@
if [ x$IF_METRIC != x ]; then
metric_arg="metric $IF_METRIC"
fi
-@@ -137,7 +140,7 @@
+@@ -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 \
@@ -139,7 +139,7 @@
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router $metric_arg dev $interface >/dev/null 2>&1
-@@ -195,7 +198,7 @@
+@@ -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 \
@@ -150,7 +150,7 @@
set $new_routers
--- client/scripts/solaris
+++ client/scripts/solaris
-@@ -72,6 +72,9 @@
+@@ -76,6 +76,9 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
@@ -160,7 +160,7 @@
ifconfig=/sbin/ifconfig
-@@ -134,7 +137,7 @@
+@@ -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 \
@@ -169,7 +169,7 @@
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
-@@ -176,7 +179,7 @@
+@@ -179,7 +181,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 \
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch
index 3684904e1e47..b5f9429a84c3 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch
@@ -1,6 +1,6 @@
--- client/clparse.c
+++ client/clparse.c
-@@ -63,6 +63,7 @@
+@@ -51,6 +51,7 @@
DHO_DOMAIN_NAME,
DHO_DOMAIN_NAME_SERVERS,
DHO_HOST_NAME,
@@ -10,7 +10,7 @@
--- client/scripts/bsdos
+++ client/scripts/bsdos
-@@ -7,6 +7,24 @@
+@@ -7,6 +7,26 @@
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
@@ -19,25 +19,27 @@
+}
+
+make_ntp_conf() {
-+ 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"
-+ echo -e "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/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"
++ echo -e "${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,25 @@
+@@ -32,8 +32,28 @@
done
fi
fi
@@ -46,26 +48,29 @@
}
+make_ntp_conf() {
-+ 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"
-+ echo -e "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/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"
++ echo -e "${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,24 @@
+@@ -30,6 +30,26 @@
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
@@ -74,25 +79,27 @@
+}
+
+make_ntp_conf() {
-+ 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"
-+ echo -e "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/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"
++ echo -e "${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,24 @@
+@@ -7,6 +7,26 @@
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
@@ -101,25 +108,27 @@
+}
+
+make_ntp_conf() {
-+ 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"
-+ echo -e "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/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"
++ echo -e "${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,24 @@
+@@ -7,6 +7,26 @@
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
@@ -128,25 +137,27 @@
+}
+
+make_ntp_conf() {
-+ 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"
-+ echo -e "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/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"
++ echo -e "${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,24 @@
+@@ -7,6 +7,26 @@
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
@@ -155,18 +166,20 @@
+}
+
+make_ntp_conf() {
-+ 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"
-+ echo -e "${conf}" > /etc/ntp.conf
-+ chmod 644 /etc/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"
++ echo -e "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
+ fi
}
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
index 4355a5143225..466697cf63aa 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
@@ -1,55 +1,41 @@
--- client/scripts/bsdos
+++ client/scripts/bsdos
-@@ -1,11 +1,20 @@
+@@ -1,11 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
- echo search $new_domain_name >/etc/resolv.conf
-+ 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
+- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
-+ conf="${conf}nameserver $nameserver\n"
- done
-+ if [ -x /sbin/resolvconf ]; then
-+ echo -e "$conf" | resolvconf -a "$interface"
-+ else
-+ echo -e "$conf" > /etc/resolv.conf
-+ chmod 644 /etc/resolv.conf
+- done
++ 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
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -176,6 +188,7 @@
- ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
- route add $alias_ip_address 127.0.0.1
- fi
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 0
- fi
-
-@@ -221,6 +231,7 @@
- fi
- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
- |sh >/dev/null 2>&1
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 1
- fi
-
--- client/scripts/freebsd
+++ client/scripts/freebsd
-@@ -11,25 +11,19 @@
+@@ -11,25 +11,21 @@
fi
make_resolv_conf() {
- if [ x"$new_domain_name_servers" != x ]; 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
+- if [ "x$new_domain_name" != x ]; then
- ( echo search $new_domain_name >/etc/resolv.conf )
- exit_status=$?
- else
@@ -59,207 +45,147 @@
- else
- ( touch /etc/resolv.conf )
- exit_status=$?
-- fi
-+ conf="${conf}search $new_domain_name\n"
- fi
++ 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
+- fi
- if [ $exit_status -ne 0 ]; then
- $LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
-+ for nameserver in $new_domain_name_servers; do
-+ conf="${conf}nameserver $nameserver\n"
-+ done
-+ if [ -x /sbin/resolvconf ]; then
-+ echo -e "$conf" | resolvconf -a "$interface"
- else
-- for nameserver in $new_domain_name_servers; do
+- else
+ for nameserver in $new_domain_name_servers; do
- ( echo nameserver $nameserver >>/etc/resolv.conf )
-- done
-+ echo -e "$conf" > /etc/resolv.conf
-+ chmod 644 /etc/resolv.conf
++ conf="${conf}nameserver $nameserver\n"
+ done
++ if [ -x /sbin/resolvconf ]; then
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
fi
fi
# If we're making confs, may as well make an ntp.conf too
-@@ -207,6 +201,7 @@
- ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
- route add $alias_ip_address 127.0.0.1
- fi
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 0
- fi
-
-@@ -256,6 +251,7 @@
- fi
- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
- |sh >/dev/null 2>&1
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 1
- fi
-
--- client/scripts/linux
+++ client/scripts/linux
-@@ -23,12 +23,20 @@
+@@ -23,12 +23,22 @@
# of the $1 in its args.
make_resolv_conf() {
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
- echo search $new_domain_name >/etc/resolv.conf
- chmod 644 /etc/resolv.conf
-+ 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
+- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
-+ conf="${conf}nameserver $nameserver\n"
- done
-+ if [ -x /sbin/resolvconf ]; then
-+ echo -e "$conf" | resolvconf -a "$interface"
-+ else
-+ echo -e "$conf" > /etc/resolv.conf
-+ chmod 644 /etc/resolv.conf
+- done
++ 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
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -183,6 +191,7 @@
- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
- route add -host $alias_ip_address dev $interface:0
- fi
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 0
- fi
-
-@@ -211,6 +220,7 @@
- exit_with_hooks 0
- fi
- ifconfig $interface inet 0.0.0.0
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 1
- fi
-
--- client/scripts/netbsd
+++ client/scripts/netbsd
-@@ -1,11 +1,20 @@
+@@ -1,11 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
- echo search $new_domain_name >/etc/resolv.conf
-+ 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
+- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
-+ conf="${conf}nameserver $nameserver\n"
- done
-+ if [ -x /sbin/resolvconf ]; then
-+ echo -e "$conf" | resolvconf -a "$interface"
-+ else
-+ echo -e "$conf" > /etc/resolv.conf
-+ chmod 644 /etc/resolv.conf
+- done
++ 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
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -176,6 +185,7 @@
- ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
- route add $alias_ip_address 127.0.0.1
- fi
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 0
- fi
-
-@@ -221,6 +231,7 @@
- fi
- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
- |sh >/dev/null 2>&1
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 1
- fi
-
--- client/scripts/openbsd
+++ client/scripts/openbsd
-@@ -1,11 +1,20 @@
+@@ -1,11 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
- echo search $new_domain_name >/etc/resolv.conf
-+ 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
+- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
-+ conf="${conf}nameserver $nameserver\n"
- done
-+ if [ -x /sbin/resolvconf ]; then
-+ echo -e "$conf" | resolvconf -a "$interface"
-+ else
-+ echo -e "$conf" > /etc/resolv.conf
-+ chmod 644 /etc/resolv.conf
+- done
++ 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
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -176,6 +185,7 @@
- ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
- route add $alias_ip_address 127.0.0.1
- fi
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 0
- fi
-
-@@ -221,6 +231,7 @@
- fi
- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
- |sh >/dev/null 2>&1
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 1
- fi
-
--- client/scripts/solaris
+++ client/scripts/solaris
-@@ -1,11 +1,20 @@
+@@ -1,11 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
- echo search $new_domain_name >/etc/resolv.conf
-+ 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
+- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
-+ conf="${conf}nameserver $nameserver\n"
- done
-+ if [ -x /sbin/resolvconf ]; then
-+ echo -e "$conf" | resolvconf -a "$interface"
-+ else
-+ echo -e "$conf" > /etc/resolv.conf
-+ chmod 644 /etc/resolv.conf
+- done
++ 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
++ echo -e "$conf" | resolvconf -a "$interface"
++ else
++ echo -e "$conf" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -157,6 +166,7 @@
- $ifconfig ${interface}:1 inet $alias_ip_address $alias_subnet_arg
- route add $alias_ip_address 127.0.0.1 1
- fi
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 0
- fi
-
-@@ -186,6 +196,7 @@
- for router in $old_routers; do
- route delete default $router >/dev/null 2>&1
- done
-+ [ -x /sbin/resolvconf ] && resolvconf -d "$interface"
- exit_with_hooks 1
- fi
-