From 8c364c784966be1700ea39ae45028f3e9be9cae0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 27 Mar 2018 22:40:05 +0100 Subject: gentoo resync : 27.03.2018 --- .../dhcp/files/dhcp-3.0.3-dhclient-no-down.patch | 70 ---- .../dhcp/files/dhcp-4.2.2-bind-build-flags.patch | 14 - net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch | 46 --- net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch | 72 ---- net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch | 15 - .../files/dhcp-4.3.1-dhclient-resolvconf.patch | 411 --------------------- net-misc/dhcp/files/dhcp-4.3.4-dhclient-ntp.patch | 209 ----------- 7 files changed, 837 deletions(-) delete mode 100644 net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.4-dhclient-ntp.patch (limited to 'net-misc/dhcp/files') diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch deleted file mode 100644 index 3a3b956e3616..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/client/scripts/linux -+++ b/client/scripts/linux -@@ -118,9 +118,9 @@ - if [ x$reason = xPREINIT ]; then - if [ x$alias_ip_address != x ]; then - # Bring down alias interface. Its routes will disappear too. -- ifconfig $interface:0- inet 0 -+ ifconfig $interface:0- inet 0.0.0.0 - fi -- ifconfig $interface 0 up -+ ifconfig $interface 0.0.0.0 up - - # We need to give the kernel some time to get the interface up. - sleep 1 -@@ -145,12 +145,12 @@ - if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \ - [ x$alias_ip_address != x$old_ip_address ]; then - # Possible new alias. Remove old alias. -- ifconfig $interface:0- inet 0 -+ ifconfig $interface:0- inet 0.0.0.0 - fi - if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then - # IP address changed. Bringing down the interface will delete all routes, - # and clear the ARP cache. -- ifconfig $interface inet 0 down -+ ifconfig $interface inet 0.0.0.0 - - fi - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ -@@ -171,7 +171,7 @@ - fi - if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; - then -- ifconfig $interface:0- inet 0 -+ ifconfig $interface:0- inet 0.0.0.0 - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address $interface:0 - fi -@@ -183,11 +183,11 @@ - || [ x$reason = xSTOP ]; then - if [ x$alias_ip_address != x ]; then - # Turn off alias interface. -- ifconfig $interface:0- inet 0 -+ ifconfig $interface:0- inet 0.0.0.0 - fi - if [ x$old_ip_address != x ]; then - # Shut down interface, which will delete routes and clear arp cache. -- ifconfig $interface inet 0 down -+ ifconfig $interface inet 0.0.0.0 - fi - if [ x$alias_ip_address != x ]; then - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg -@@ -198,7 +198,7 @@ - - if [ x$reason = xTIMEOUT ]; then - if [ x$alias_ip_address != x ]; then -- ifconfig $interface:0- inet 0 -+ ifconfig $interface:0- inet 0.0.0.0 - fi - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg -@@ -223,7 +223,7 @@ - make_resolv_conf - exit_with_hooks 0 - fi -- ifconfig $interface inet 0 down -+ ifconfig $interface inet 0.0.0.0 - exit_with_hooks 1 - fi - diff --git a/net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch b/net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch deleted file mode 100644 index ae33638284b8..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch +++ /dev/null @@ -1,14 +0,0 @@ -bind sets up BUILD_XXX vars for building native tools, but then -doesn't use them for the "gen" tool - ---- a/bind/lib/export/dns/Makefile.in -+++ b/bind/lib/export/dns/Makefile.in -@@ -166,7 +166,7 @@ - ./gen -s ${srcdir} > code.h - - gen: ${srcdir}/gen.c -- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS} -+ ${BUILD_CC} ${BUILD_CFLAGS} ${CINCLUDES} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS} - - #We don't need rbtdb64 for this library - #rbtdb64.@O@: rbtdb.c diff --git a/net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch b/net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch deleted file mode 100644 index 27fb2b0e6025..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch +++ /dev/null @@ -1,46 +0,0 @@ -http://bugs.gentoo.org/265531 - ---- dhcp-4.2.2/client/scripts/linux -+++ dhcp-4.2.2/client/scripts/linux -@@ -193,12 +193,14 @@ - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg - # Add a network route to the computed network address. -- for router in $new_routers; do -- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -- route add -host $router dev $interface -- fi -- route add default gw $router $metric_arg dev $interface -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ for router in $new_routers; do -+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -+ route add -host $router dev $interface -+ fi -+ route add default gw $router $metric_arg dev $interface -+ done -+ fi - else - # we haven't changed the address, have we changed other options - # that we wish to update? -@@ -244,12 +246,14 @@ - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address dev $interface:0 - fi -- for router in $new_routers; do -- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -- route add -host $router dev $interface -- fi -- route add default gw $router $metric_arg dev $interface -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ for router in $new_routers; do -+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -+ route add -host $router dev $interface -+ fi -+ route add default gw $router $metric_arg dev $interface -+ done -+ fi - make_resolv_conf - exit_with_hooks 0 - fi diff --git a/net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch b/net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch deleted file mode 100644 index 66a1fcd79461..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch +++ /dev/null @@ -1,72 +0,0 @@ -https://bugs.gentoo.org/296921 - -`ping -q` will still print out summary information. send that to /dev/null. - -patch by Martin Mokrejš - ---- a/client/scripts/bsdos -+++ b/client/scripts/bsdos -@@ -251,7 +251,7 @@ if [ x$reason = xTIMEOUT ]; then - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers -- if ping -q -c 1 -w 1 $1; then -+ if ping -q -c 1 -w 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- a/client/scripts/freebsd -+++ b/client/scripts/freebsd -@@ -284,7 +284,7 @@ if [ x$reason = xTIMEOUT ]; then - if [ -n "$new_routers" ]; then - $LOGGER "New Routers: $new_routers" - set -- $new_routers -- if ping -q -c 1 $1; then -+ if ping -q -c 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- a/client/scripts/linux -+++ b/client/scripts/linux -@@ -253,7 +253,7 @@ if [ x$reason = xTIMEOUT ]; then - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg - set $new_routers -- if ping -q -c 1 $1; then -+ if ping -q -c 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg ---- a/client/scripts/netbsd -+++ b/client/scripts/netbsd -@@ -251,7 +251,7 @@ if [ x$reason = xTIMEOUT ]; then - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers -- if ping -q -c 1 -w 1 $1; then -+ if ping -q -c 1 -w 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- a/client/scripts/openbsd -+++ b/client/scripts/openbsd -@@ -245,7 +245,7 @@ if [ x$reason = xTIMEOUT ]; then - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers -- if ping -q -c 1 -w 1 $1; then -+ if ping -q -c 1 -w 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- a/client/scripts/openwrt -+++ b/client/scripts/openwrt -@@ -186,7 +186,7 @@ if [ x$reason = xTIMEOUT ]; then - ifconfig $interface $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg $metric_arg - set $new_routers -- if ping -q -c 1 $1; then -+ if ping -q -c 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface:0 $alias_ip_address $alias_subnet_arg diff --git a/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch b/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch deleted file mode 100644 index ea223ed38b6e..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch +++ /dev/null @@ -1,15 +0,0 @@ -find `ip` via $PATH and not hardcoded path - -https://bugs.gentoo.org/480636 - ---- a/client/scripts/linux -+++ b/client/scripts/linux -@@ -23,7 +23,7 @@ - # of the $1 in its args. - - # 'ip' just looks too weird. /sbin/ip looks less weird. --ip=/sbin/ip -+ip=ip - - make_resolv_conf() { - if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then diff --git a/net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch deleted file mode 100644 index 71d3f2c69dc5..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch +++ /dev/null @@ -1,411 +0,0 @@ -resolvconf support in dhclient-script - ---- a/client/scripts/bsdos -+++ b/client/scripts/bsdos -@@ -1,40 +1,46 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient - if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_search}\n" - elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >> /etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do - # If the nameserver has a link-local address - # add a (interface name) to it. - case $nameserver in - fe80:*) zone_id="%$interface";; - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}$zone_id\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - ---- a/client/scripts/freebsd -+++ b/client/scripts/freebsd -@@ -11,73 +11,45 @@ - fi - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- ( cat /dev/null > /etc/resolv.conf.dhclient ) -- exit_status=$? -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" -- else -- if [ "x$new_domain_search" != x ]; then -- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- fi -- for nameserver in $new_domain_name_servers; do -- if [ $exit_status -ne 0 ]; then -- break -- fi -- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) -- exit_status=$? -- done -- -- # If there were no errors, attempt to mv the new file into place. -- if [ $exit_status -eq 0 ]; then -- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) -- exit_status=$? -- fi -- -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then -+ # Note that the DHCP 'Domain Name Option' is really just a domain -+ # name, and that this practice of using the domain name option as -+ # a search path is both nonstandard and deprecated. -+ conf="${conf}search ${new_domain_name}\n" - fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver ${nameserver}\n" -+ done - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- ( cat /dev/null > /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status" -- else -- if [ "x${new_dhcp6_domain_search}" != x ] ; then -- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- fi -- for nameserver in ${new_dhcp6_name_servers} ; do -- if [ $exit_status -ne 0 ] ; then -- break -- fi - # If the nameserver has a link-local address - # add a (interface name) to it. - case $nameserver in - fe80:*) zone_id="%$interface";; - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- ( echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- done -- -- if [ $exit_status -eq 0 ] ; then -- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ) -- exit_status=$? -- fi -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}$zone_id\n" -+ done -+ fi - -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf - fi - fi - } ---- a/client/scripts/linux -+++ b/client/scripts/linux -@@ -26,44 +26,49 @@ - ip=/sbin/ip - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- chmod 644 /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - shopt -s nocasematch - for nameserver in ${new_dhcp6_name_servers} ; do - # If the nameserver has a link-local address - # add a (interface name) to it. - if [[ "$nameserver" =~ ^fe80:: ]] - then - zone_id="%$interface" - else - zone_id= - fi -- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}$zone_id\n" - done - shopt -u nocasematch -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - ---- a/client/scripts/netbsd -+++ b/client/scripts/netbsd -@@ -1,40 +1,46 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ "x$new_domain_name" != x ]; then -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= -+ if [ x"$new_domain_name_servers" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do - # If the nameserver has a link-local address - # add a (interface name) to it. - case $nameserver in - fe80:*) zone_id="%$interface";; - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}$zone_id\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - ---- a/client/scripts/openbsd -+++ b/client/scripts/openbsd -@@ -1,40 +1,46 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= -+ if [ x"$new_domain_name_servers" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do - # If the nameserver has a link-local address - # add a (interface name) to it. - case $nameserver in - fe80:*) zone_id="%$interface";; - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}$zone_id\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - ---- a/client/scripts/solaris -+++ b/client/scripts/solaris -@@ -1,21 +1,39 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" -+ done -+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - diff --git a/net-misc/dhcp/files/dhcp-4.3.4-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-4.3.4-dhclient-ntp.patch deleted file mode 100644 index 207631710e75..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.4-dhclient-ntp.patch +++ /dev/null @@ -1,209 +0,0 @@ ---- dhcp-4.3.4/client/clparse.c -+++ dhcp-4.3.4/client/clparse.c -@@ -31,7 +31,7 @@ - - struct client_config top_level_config; - --#define NUM_DEFAULT_REQUESTED_OPTS 9 -+#define NUM_DEFAULT_REQUESTED_OPTS 10 - /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */ - struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1]; - -@@ -107,15 +107,20 @@ - dhcp_universe.code_hash, &code, 0, MDL); - - /* 8 */ -- code = D6O_NAME_SERVERS; -+ code = DHO_NTP_SERVERS; - option_code_hash_lookup(&default_requested_options[7], -- dhcpv6_universe.code_hash, &code, 0, MDL); -+ dhcp_universe.code_hash, &code, 0, MDL); - - /* 9 */ -- code = D6O_DOMAIN_SEARCH; -+ code = D6O_NAME_SERVERS; - option_code_hash_lookup(&default_requested_options[8], - dhcpv6_universe.code_hash, &code, 0, MDL); - -+ /* 10 */ -+ code = D6O_DOMAIN_SEARCH; -+ option_code_hash_lookup(&default_requested_options[9], -+ dhcpv6_universe.code_hash, &code, 0, MDL); -+ - for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) { - if (default_requested_options[code] == NULL) - log_fatal("Unable to find option definition for " ---- dhcp-4.3.4/client/scripts/bsdos -+++ dhcp-4.3.4/client/scripts/bsdos -@@ -36,6 +36,26 @@ - - mv /etc/resolv.conf.dhclient6 /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ x$new_ntp_servers != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.4/client/scripts/freebsd -+++ dhcp-4.3.4/client/scripts/freebsd -@@ -80,6 +80,26 @@ - fi - fi - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.4/client/scripts/linux -+++ dhcp-4.3.4/client/scripts/linux -@@ -65,6 +65,26 @@ - - mv /etc/resolv.conf.dhclient6 /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.4/client/scripts/netbsd -+++ dhcp-4.3.4/client/scripts/netbsd -@@ -36,6 +36,26 @@ - - mv /etc/resolv.conf.dhclient6 /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.4/client/scripts/openbsd -+++ dhcp-4.3.4/client/scripts/openbsd -@@ -36,6 +36,26 @@ - - mv /etc/resolv.conf.dhclient6 /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.4/client/scripts/solaris -+++ dhcp-4.3.4/client/scripts/solaris -@@ -17,6 +17,26 @@ - - mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. -- cgit v1.2.3