summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-03-05 23:50:43 +0000
committerMike Frysinger <vapier@gentoo.org>2011-03-05 23:50:43 +0000
commitdae8cd82aa4921a1c8815a867891b24bc9510002 (patch)
treee2f163707157de37a3ccb80b1fd4c964bc9d769b /net-misc/dhcp/files
parentFix md5 deprecation warning (bug #308299). (diff)
downloadhistorical-dae8cd82aa4921a1c8815a867891b24bc9510002.tar.gz
historical-dae8cd82aa4921a1c8815a867891b24bc9510002.tar.bz2
historical-dae8cd82aa4921a1c8815a867891b24bc9510002.zip
old
Diffstat (limited to 'net-misc/dhcp/files')
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-dhclient-metric.patch205
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-dhclient-resolvconf.patch390
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-dhclient-script-correct-operators.patch48
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-dhclient-stdin-conf.patch115
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-linux-ipv6-header.patch25
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-no_isc_blurb.patch96
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-paranoia.patch189
-rw-r--r--net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch189
-rw-r--r--net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch96
9 files changed, 0 insertions, 1353 deletions
diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-metric.patch
deleted file mode 100644
index cca3e2b1d473..000000000000
--- a/net-misc/dhcp/files/dhcp-4.0-dhclient-metric.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-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 13:22:40.000000000 +0100
-+++ dhcp-4.0.0/client/scripts/bsdos 2008-09-01 13:23:24.000000000 +0100
-@@ -95,6 +95,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"
-@@ -156,7 +159,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
-@@ -213,7 +216,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
-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 13:22:40.000000000 +0100
-+++ dhcp-4.0.0/client/scripts/freebsd 2008-09-01 13:23:24.000000000 +0100
-@@ -139,6 +139,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"
-@@ -200,7 +203,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"
-@@ -264,7 +267,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"
-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 13:22:40.000000000 +0100
-+++ dhcp-4.0.0/client/scripts/linux 2008-09-01 13:26:19.000000000 +0100
-@@ -98,11 +98,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/'`
--
- ###
- ### DHCPv4 Handlers
- ###
-@@ -125,6 +120,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).
-@@ -136,15 +134,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
-@@ -186,12 +176,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 ];
-@@ -234,12 +226,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
-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 13:22:40.000000000 +0100
-+++ dhcp-4.0.0/client/scripts/netbsd 2008-09-01 13:23:33.000000000 +0100
-@@ -95,6 +95,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"
-@@ -156,7 +159,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
-@@ -213,7 +216,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
-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 13:22:40.000000000 +0100
-+++ dhcp-4.0.0/client/scripts/solaris 2008-09-01 13:23:33.000000000 +0100
-@@ -78,6 +78,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
-
-@@ -140,7 +143,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
-@@ -181,7 +184,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
diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-resolvconf.patch
deleted file mode 100644
index 063b8e33e146..000000000000
--- a/net-misc/dhcp/files/dhcp-4.0-dhclient-resolvconf.patch
+++ /dev/null
@@ -1,390 +0,0 @@
-diff -ur a/client/scripts/bsdos b/client/scripts/bsdos
---- a/client/scripts/bsdos 2008-09-01 14:41:00.000000000 +0100
-+++ b/client/scripts/bsdos 2008-09-01 14:57:33.000000000 +0100
-@@ -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 -ur a/client/scripts/freebsd b/client/scripts/freebsd
---- a/client/scripts/freebsd 2008-09-01 14:41:00.000000000 +0100
-+++ b/client/scripts/freebsd 2008-09-01 15:00:18.000000000 +0100
-@@ -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 -ur a/client/scripts/linux b/client/scripts/linux
---- a/client/scripts/linux 2008-09-01 14:41:00.000000000 +0100
-+++ b/client/scripts/linux 2008-09-01 14:58:09.000000000 +0100
-@@ -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 -ur a/client/scripts/netbsd b/client/scripts/netbsd
---- a/client/scripts/netbsd 2008-09-01 14:41:00.000000000 +0100
-+++ b/client/scripts/netbsd 2008-09-01 14:58:40.000000000 +0100
-@@ -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
- }
-diff -ur a/client/scripts/openbsd b/client/scripts/openbsd
---- a/client/scripts/openbsd 2008-09-01 14:41:00.000000000 +0100
-+++ b/client/scripts/openbsd 2008-09-01 14:59:12.000000000 +0100
-@@ -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 -ur a/client/scripts/solaris b/client/scripts/solaris
---- a/client/scripts/solaris 2008-09-01 14:41:00.000000000 +0100
-+++ b/client/scripts/solaris 2008-09-01 14:59:27.000000000 +0100
-@@ -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
- }
diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-script-correct-operators.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-script-correct-operators.patch
deleted file mode 100644
index 7cf0b241add3..000000000000
--- a/net-misc/dhcp/files/dhcp-4.0-dhclient-script-correct-operators.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-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-03 00:52:41.000000000 +0100
-+++ dhcp-4.0.0/client/scripts/linux 2008-09-03 00:53:16.000000000 +0100
-@@ -258,7 +232,7 @@
- ### DHCPv6 Handlers
- ###
-
--if [ ${reason} = PREINIT6 ] ; then
-+if [ x$reason = xPREINIT6 ] ; then
- # Ensure interface is up.
- ${ip} link set ${interface} up
-
-@@ -268,7 +242,7 @@
- exit_with_hooks 0
- fi
-
--if [ ${reason} = BOUND6 ] ; then
-+if [ x$reason = xBOUND6 ] ; then
- if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
- exit_with_hooks 2;
- fi
-@@ -282,7 +256,7 @@
- exit_with_hooks 0
- fi
-
--if [ ${reason} = RENEW6 ] || [ ${reason} = REBIND6 ] ; then
-+if [ x$reason = xRENEW6 ] || [ x$reason} = xREBIND6 ] ; then
- # Make sure nothing has moved around on us.
-
- # Nameservers/domains/etc.
-@@ -294,7 +268,7 @@
- exit_with_hooks 0
- fi
-
--if [ ${reason} = DEPREF6 ] ; then
-+if [ x$reason = xDEPREF6 ] ; then
- if [ x${new_ip6_prefixlen} = x ] ; then
- exit_with_hooks 2;
- fi
-@@ -307,7 +281,7 @@
- exit_with_hooks 0
- fi
-
--if [ ${reason} = EXPIRE6 -o ${reason} = RELEASE6 -o ${reason} = STOP6 ] ; then
-+if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ] ; then
- if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then
- exit_with_hooks 2;
- fi
diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-stdin-conf.patch
deleted file mode 100644
index c5bfb150605c..000000000000
--- a/net-misc/dhcp/files/dhcp-4.0-dhclient-stdin-conf.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-diff -ur a/client/clparse.c b/client/clparse.c
---- a/client/clparse.c 2008-09-03 21:39:30.000000000 +0100
-+++ b/client/clparse.c 2008-09-03 23:10:48.000000000 +0100
-@@ -172,6 +172,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;
-@@ -201,21 +205,13 @@
- return status;
- }
-
--int read_client_conf_file (const char *name, struct interface_info *ip,
-- struct client_config *client)
-+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 = (struct parse *)0;
-- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0);
--
- do {
- token = peek_token (&val, (unsigned *)0, cfile);
- if (token == END_OF_FILE)
-@@ -226,10 +222,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>
-Files a/client/clparse.o and b/client/clparse.o differ
-Files a/client/dhclient and b/client/dhclient differ
diff --git a/net-misc/dhcp/files/dhcp-4.0-linux-ipv6-header.patch b/net-misc/dhcp/files/dhcp-4.0-linux-ipv6-header.patch
deleted file mode 100644
index 948bd878ec15..000000000000
--- a/net-misc/dhcp/files/dhcp-4.0-linux-ipv6-header.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -uNr dhcp-4.0.0.ORIG/common/socket.c dhcp-4.0.0/common/socket.c
---- dhcp-4.0.0.ORIG/common/socket.c 2008-09-02 10:25:21.000000000 +0100
-+++ dhcp-4.0.0/common/socket.c 2008-09-02 10:27:29.000000000 +0100
-@@ -46,6 +46,10 @@
- #include <sys/uio.h>
- #include <sys/uio.h>
-
-+#ifdef HAVE_LINUX_IPV6_H
-+#include <linux/ipv6.h>
-+#endif
-+
- #ifdef USE_SOCKET_FALLBACK
- # if !defined (USE_SOCKET_SEND)
- # define if_register_send if_register_fallback
-diff -uNr dhcp-4.0.0.ORIG/configure.ac dhcp-4.0.0/configure.ac
---- dhcp-4.0.0.ORIG/configure.ac 2008-09-02 10:25:21.000000000 +0100
-+++ dhcp-4.0.0/configure.ac 2008-09-02 10:26:29.000000000 +0100
-@@ -37,6 +37,7 @@
- if test "$enable_dhcpv6" != "no"; then
- AC_DEFINE([DHCPv6], [1],
- [Define to 1 to include DHCPv6 support.])
-+ AC_CHECK_HEADERS(linux/ipv6.h)
- fi
-
- ###
diff --git a/net-misc/dhcp/files/dhcp-4.0-no_isc_blurb.patch b/net-misc/dhcp/files/dhcp-4.0-no_isc_blurb.patch
deleted file mode 100644
index ac37e954b84b..000000000000
--- a/net-misc/dhcp/files/dhcp-4.0-no_isc_blurb.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -uNr dhcp-4.0.0.ORIG/client/dhclient.c dhcp-4.0.0/client/dhclient.c
---- dhcp-4.0.0.ORIG/client/dhclient.c 2008-09-01 13:38:38.000000000 +0100
-+++ dhcp-4.0.0/client/dhclient.c 2008-09-01 13:41:32.000000000 +0100
-@@ -80,6 +80,8 @@
-
- static isc_result_t write_duid(struct data_string *duid);
-
-+extern int log_isc_blurb;
-+
- int
- main(int argc, char **argv) {
- int fd;
-@@ -323,6 +325,7 @@
- log_info ("%s", "");
- } else {
- log_perror = 0;
-+ log_isc_blurb = 0;
- quiet_interface_discovery = 1;
- }
-
-diff -uNr dhcp-4.0.0.ORIG/omapip/errwarn.c dhcp-4.0.0/omapip/errwarn.c
---- dhcp-4.0.0.ORIG/omapip/errwarn.c 2008-09-01 13:38:38.000000000 +0100
-+++ dhcp-4.0.0/omapip/errwarn.c 2008-09-01 13:39:17.000000000 +0100
-@@ -43,6 +43,8 @@
- int log_perror = 1;
- #endif
- int log_priority;
-+int log_isc_blurb=1;
-+
- void (*log_cleanup) (void);
-
- #define CVT_BUF_MAX 1023
-@@ -74,7 +76,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");
-@@ -92,7 +96,12 @@
- log_error ("the README file.");
- log_error ("%s", "");
- log_error ("exiting.");
-+ }else
-+ {
-+ log_error ("exiting.");
-+ }
- #endif
-+
- if (log_cleanup)
- (*log_cleanup) ();
- exit (1);
-diff -uNr dhcp-4.0.0.ORIG/relay/dhcrelay.c dhcp-4.0.0/relay/dhcrelay.c
---- dhcp-4.0.0.ORIG/relay/dhcrelay.c 2008-09-01 13:38:38.000000000 +0100
-+++ dhcp-4.0.0/relay/dhcrelay.c 2008-09-01 13:43:15.000000000 +0100
-@@ -97,6 +97,7 @@
- static char arr [] = "All rights reserved.";
- 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(int argc, char **argv) {
-@@ -163,6 +164,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")) {
-diff -uNr dhcp-4.0.0.ORIG/server/dhcpd.c dhcp-4.0.0/server/dhcpd.c
---- dhcp-4.0.0.ORIG/server/dhcpd.c 2008-09-01 13:38:38.000000000 +0100
-+++ dhcp-4.0.0/server/dhcpd.c 2008-09-01 13:42:37.000000000 +0100
-@@ -61,6 +61,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
-@@ -359,6 +362,7 @@
- lftest = 1;
- log_perror = -1;
- } else if (!strcmp (argv [i], "-q")) {
-+ log_isc_blurb = 0;
- quiet = 1;
- quiet_interface_discovery = 1;
- #ifdef DHCPv6
diff --git a/net-misc/dhcp/files/dhcp-4.0-paranoia.patch b/net-misc/dhcp/files/dhcp-4.0-paranoia.patch
deleted file mode 100644
index 4c3ce76e6e39..000000000000
--- a/net-misc/dhcp/files/dhcp-4.0-paranoia.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-diff -uNr dhcp-4.0.0.ORIG/configure.ac dhcp-4.0.0/configure.ac
---- dhcp-4.0.0.ORIG/configure.ac 2008-09-02 10:57:37.000000000 +0100
-+++ dhcp-4.0.0/configure.ac 2008-09-02 11:00:27.000000000 +0100
-@@ -30,6 +30,17 @@
- [Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs)
- or LITTLE_ENDIAN for LSB (Intel CPUs).])
-
-+# Paranoia/early chrooting is off by default
-+AC_ARG_ENABLE(paranoia,
-+ AC_HELP_STRING([--enable-paranoia],
-+ [enable support for early chroot (default is no)]))
-+if test "$enable_paranoia" != "no"; then
-+ AC_DEFINE([PARANOIA], [1],
-+ [Define to enable paranoia.])
-+ AC_DEFINE([EARLY_CHROOT], [1],
-+ [Define to 1 to chroot early.])
-+fi
-+
- # DHCPv6 is off by default
- AC_ARG_ENABLE(dhcpv6,
- AC_HELP_STRING([--enable-dhcpv6],
-diff -uNr dhcp-4.0.0.ORIG/server/dhcpd.c dhcp-4.0.0/server/dhcpd.c
---- dhcp-4.0.0.ORIG/server/dhcpd.c 2008-09-02 10:57:37.000000000 +0100
-+++ dhcp-4.0.0/server/dhcpd.c 2008-09-02 10:57:54.000000000 +0100
-@@ -46,6 +46,16 @@
- #include <sys/types.h>
- #include <signal.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(void);
-
- struct iaddr server_identifier;
-@@ -195,6 +205,21 @@
- 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 */
-+
- #ifndef UNIT_TEST
- int
- main(int argc, char **argv) {
-@@ -224,6 +249,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 that file descriptors 0 (stdin), 1, (stdout), and
- 2 (stderr) are open. To do this, we assume that when we
-@@ -284,6 +317,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 ();
-@@ -438,6 +485,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)
- {
-@@ -576,6 +661,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);
-@@ -659,6 +748,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);
-@@ -1039,6 +1144,10 @@
- #else /* !DHCPv6 */
- " [-cf config-file] [-lf lease-file]\n"
- #endif /* DHCPv6 */
-+#if defined (PARANOIA)
-+ /* meld into the following string */
-+ "\n [-user user] [-group group] [-chroot dir]"
-+#endif /* PARANOIA */
- #if defined (TRACING)
- " [-tf trace-output-file]\n"
- " [-play trace-input-file]\n"
diff --git a/net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch
deleted file mode 100644
index 3556d974864b..000000000000
--- a/net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-diff -uNr dhcp-4.1.0.ORIG/client/scripts/bsdos dhcp-4.1.0/client/scripts/bsdos
---- dhcp-4.1.0.ORIG/client/scripts/bsdos 2009-07-09 15:16:11.000000000 +0100
-+++ dhcp-4.1.0/client/scripts/bsdos 2009-07-09 15:17:41.000000000 +0100
-@@ -102,6 +102,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"
-@@ -163,7 +166,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
-@@ -220,7 +223,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
-diff -uNr dhcp-4.1.0.ORIG/client/scripts/freebsd dhcp-4.1.0/client/scripts/freebsd
---- dhcp-4.1.0.ORIG/client/scripts/freebsd 2009-07-09 15:16:11.000000000 +0100
-+++ dhcp-4.1.0/client/scripts/freebsd 2009-07-09 15:17:41.000000000 +0100
-@@ -112,6 +112,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"
-@@ -173,7 +176,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"
-@@ -243,7 +246,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"
-diff -uNr dhcp-4.1.0.ORIG/client/scripts/linux dhcp-4.1.0/client/scripts/linux
---- dhcp-4.1.0.ORIG/client/scripts/linux 2009-07-09 15:16:11.000000000 +0100
-+++ dhcp-4.1.0/client/scripts/linux 2009-07-09 15:20:50.000000000 +0100
-@@ -104,11 +104,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/'`
--
- ###
- ### DHCPv4 Handlers
- ###
-@@ -131,6 +126,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).
-@@ -142,15 +140,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
-@@ -192,15 +182,17 @@
- 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
- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
-- route add -host $router dev $interface
-+ route add -host $router $metric_arg dev $interface
- fi
-- 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 ];
-diff -uNr dhcp-4.1.0.ORIG/client/scripts/netbsd dhcp-4.1.0/client/scripts/netbsd
---- dhcp-4.1.0.ORIG/client/scripts/netbsd 2009-07-09 15:16:11.000000000 +0100
-+++ dhcp-4.1.0/client/scripts/netbsd 2009-07-09 15:17:41.000000000 +0100
-@@ -102,6 +102,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"
-@@ -163,7 +166,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
-@@ -220,7 +223,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
-diff -uNr dhcp-4.1.0.ORIG/client/scripts/solaris dhcp-4.1.0/client/scripts/solaris
---- dhcp-4.1.0.ORIG/client/scripts/solaris 2009-07-09 15:16:11.000000000 +0100
-+++ dhcp-4.1.0/client/scripts/solaris 2009-07-09 15:17:41.000000000 +0100
-@@ -97,6 +97,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
-
-@@ -159,7 +162,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
-@@ -200,7 +203,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
diff --git a/net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch b/net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch
deleted file mode 100644
index 1afdf21a934e..000000000000
--- a/net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -uNr dhcp-4.1.0.ORIG/client/dhclient.c dhcp-4.1.0/client/dhclient.c
---- dhcp-4.1.0.ORIG/client/dhclient.c 2009-07-09 15:29:40.000000000 +0100
-+++ dhcp-4.1.0/client/dhclient.c 2009-07-09 15:30:19.000000000 +0100
-@@ -87,6 +87,8 @@
-
- static isc_result_t write_duid(struct data_string *duid);
-
-+extern int log_isc_blurb;
-+
- int
- main(int argc, char **argv) {
- int fd;
-@@ -385,6 +387,7 @@
- log_info("%s", "");
- } else {
- log_perror = 0;
-+ log_isc_blurb = 0;
- quiet_interface_discovery = 1;
- }
-
-diff -uNr dhcp-4.1.0.ORIG/omapip/errwarn.c dhcp-4.1.0/omapip/errwarn.c
---- dhcp-4.1.0.ORIG/omapip/errwarn.c 2009-07-09 15:29:40.000000000 +0100
-+++ dhcp-4.1.0/omapip/errwarn.c 2009-07-09 15:29:52.000000000 +0100
-@@ -43,6 +43,8 @@
- int log_perror = 1;
- #endif
- int log_priority;
-+int log_isc_blurb=1;
-+
- void (*log_cleanup) (void);
-
- #define CVT_BUF_MAX 1023
-@@ -74,7 +76,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");
-@@ -92,7 +96,12 @@
- log_error ("the README file.");
- log_error ("%s", "");
- log_error ("exiting.");
-+ }else
-+ {
-+ log_error ("exiting.");
-+ }
- #endif
-+
- if (log_cleanup)
- (*log_cleanup) ();
- exit (1);
-diff -uNr dhcp-4.1.0.ORIG/relay/dhcrelay.c dhcp-4.1.0/relay/dhcrelay.c
---- dhcp-4.1.0.ORIG/relay/dhcrelay.c 2009-07-09 15:29:40.000000000 +0100
-+++ dhcp-4.1.0/relay/dhcrelay.c 2009-07-09 15:31:53.000000000 +0100
-@@ -130,6 +130,7 @@
- static char arr[] = "All rights reserved.";
- 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;
-
- #ifdef DHCPv6
- #define DHCRELAY_USAGE \
-@@ -219,6 +220,7 @@
- } else if (!strcmp(argv[i], "-q")) {
- quiet = 1;
- quiet_interface_discovery = 1;
-+ log_isc_blurb = 0;
- } else if (!strcmp(argv[i], "-p")) {
- if (++i == argc)
- usage();
-diff -uNr dhcp-4.1.0.ORIG/server/dhcpd.c dhcp-4.1.0/server/dhcpd.c
---- dhcp-4.1.0.ORIG/server/dhcpd.c 2009-07-09 15:29:40.000000000 +0100
-+++ dhcp-4.1.0/server/dhcpd.c 2009-07-09 15:29:52.000000000 +0100
-@@ -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
-@@ -367,6 +370,7 @@
- lftest = 1;
- log_perror = -1;
- } else if (!strcmp (argv [i], "-q")) {
-+ log_isc_blurb = 0;
- quiet = 1;
- quiet_interface_discovery = 1;
- #ifdef DHCPv6