diff options
author | Roy Marples <uberlord@gentoo.org> | 2006-04-20 20:06:16 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2006-04-20 20:06:16 +0000 |
commit | 54c1e5662c8327fadc56e7b747ee5712f913b053 (patch) | |
tree | 8034395a34a531c7420902892bddf4fa935cb0ec /net-misc/dhcp | |
parent | Don't build ed from here, but use sys-apps/ed that's mostly compatible. (diff) | |
download | gentoo-2-54c1e5662c8327fadc56e7b747ee5712f913b053.tar.gz gentoo-2-54c1e5662c8327fadc56e7b747ee5712f913b053.tar.bz2 gentoo-2-54c1e5662c8327fadc56e7b747ee5712f913b053.zip |
metric patch now applies to ifconfig on all OS's apart from Linux.
Split no down interface into seperate patch.
(Portage version: 2.1_pre7-r5)
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r-- | net-misc/dhcp/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/dhcp/dhcp-3.0.3-r6.ebuild | 10 | ||||
-rw-r--r-- | net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild | 12 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch | 2 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch | 229 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch | 62 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch | 67 |
7 files changed, 211 insertions, 182 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog index 459fb0c830a0..ebe84e0193fa 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.88 2006/04/14 21:19:05 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.89 2006/04/20 20:06:16 uberlord Exp $ + + 20 Apr 2006; Roy Marples <uberlord@gentoo.org> + files/dhcp-3.0.3-dhclient-hostname.patch, + files/dhcp-3.0.3-dhclient-metric.patch, + files/dhcp-3.0.3-dhclient-mtu.patch, + +files/dhcp-3.0.3-dhclient-no-down.patch, dhcp-3.0.3-r6.ebuild, + dhcp-3.0.4_beta3-r1.ebuild: + metric patch now applies to ifconfig on all OS's apart from Linux. + Split no down interface into seperate patch. 14 Apr 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/dhcp-3.0.3-r6.ebuild b/net-misc/dhcp/dhcp-3.0.3-r6.ebuild index 80e1fc812b0c..558dfc744879 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.7 2006/04/14 21:19:05 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.3-r6.ebuild,v 1.8 2006/04/20 20:06:16 uberlord Exp $ inherit eutils flag-o-matic multilib toolchain-funcs @@ -37,13 +37,15 @@ src_unpack() { 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" # Fix setting hostnames on Linux epatch "${FILESDIR}/${PN}-3.0.3-dhclient-hostname.patch" # Allow mtu settings epatch "${FILESDIR}/${PN}-3.0.3-dhclient-mtu.patch" + # Allow dhclient to use IF_METRIC to set route metrics + epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch" + # Stop downing the interface on Linux as that breaks link dameons + # such as wpa_supplicant and netplug + epatch "${FILESDIR}/${PN}-3.0.3-dhclient-no-down.patch" # Quiet the isc blurb epatch "${FILESDIR}/${PN}-3.0.3-no_isc_blurb.patch" # Enable dhclient to get extra configuration from stdin 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 f02506a17d03..4c3c663546ab 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.6 2006/04/14 21:19:05 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.4_beta3-r1.ebuild,v 1.7 2006/04/20 20:06:16 uberlord Exp $ inherit eutils flag-o-matic multilib toolchain-funcs @@ -12,7 +12,7 @@ SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" LICENSE="isc-dhcp" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="static selinux" RDEPEND="selinux? ( sec-policy/selinux-dhcp ) @@ -37,13 +37,15 @@ src_unpack() { 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" # Fix setting hostnames on Linux epatch "${FILESDIR}/${PN}-3.0.3-dhclient-hostname.patch" # Allow mtu settings epatch "${FILESDIR}/${PN}-3.0.3-dhclient-mtu.patch" + # Allow dhclient to use IF_METRIC to set route metrics + epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch" + # Stop downing the interface on Linux as that breaks link dameons + # such as wpa_supplicant and netplug + epatch "${FILESDIR}/${PN}-3.0.3-dhclient-no-down.patch" # Quiet the isc blurb epatch "${FILESDIR}/${PN}-3.0.3-no_isc_blurb.patch" # Enable dhclient to get extra configuration from stdin 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 d382c628f548..318f3d3156e6 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,6 +1,6 @@ --- client/scripts/linux +++ client/scripts/linux -@@ -141,9 +141,8 @@ +@@ -138,9 +138,8 @@ [ 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 50a08fa4d96a..b040a9bbfa3f 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,8 +1,8 @@ --- client/scripts/bsdos +++ client/scripts/bsdos -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" +@@ -84,6 +84,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" fi +if [ x$IF_METRIC != x ]; then + metric_arg="metric $IF_METRIC" @@ -10,29 +10,29 @@ if [ x$reason = xMEDIUM ]; then eval "ifconfig $interface $medium" -@@ -141,7 +141,7 @@ - $new_broadcast_arg $medium" +@@ -141,7 +144,7 @@ + if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ + [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" route add $new_ip_address 127.1 >/dev/null 2>&1 for router in $new_routers; do -- route add default $router >/dev/null 2>&1 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - if [ "$new_static_routes" != "" ]; then - set $new_static_routes -@@ -207,7 +207,7 @@ - fi - 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 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - set $new_static_routes - while [ $# -gt 1 ]; do + route add default $router >/dev/null 2>&1 +@@ -198,7 +201,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers --- client/scripts/freebsd +++ client/scripts/freebsd -@@ -91,6 +91,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" +@@ -94,6 +94,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" fi +if [ x$IF_METRIC != x ]; then + metric_arg="metric $IF_METRIC" @@ -40,29 +40,29 @@ if [ x$reason = xMEDIUM ]; then eval "ifconfig $interface $medium" -@@ -157,7 +157,7 @@ - fi - 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 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - if [ -n "$new_static_routes" ]; then - $LOGGER "New Static Routes: $new_static_routes" -@@ -228,7 +228,7 @@ - fi - 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 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - set -- $new_static_routes - while [ $# -gt 1 ]; do +@@ -151,7 +154,7 @@ + if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ + [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" +@@ -215,7 +218,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" --- client/scripts/linux +++ client/scripts/linux -@@ -103,6 +103,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" +@@ -106,6 +106,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" @@ -70,24 +70,7 @@ if [ x$reason = xMEDIUM ]; then # Linux doesn't do mediums (ok, ok, media). -@@ -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. -- 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 -- -+ # IP address changed - set existing to 0. -+ ifconfig $interface inet 0.0.0.0 - fi - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then -@@ -167,14 +165,14 @@ +@@ -169,7 +172,7 @@ route add -net $new_network_number $new_subnet_arg dev $interface fi for router in $new_routers; do @@ -96,36 +79,8 @@ done 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 $alias_ip_address $alias_subnet_arg -- route add -host $alias_ip_address $interface:0 -+ route add -host $alias_ip_address dev $interface:0 - fi - make_resolv_conf - exit_with_hooks 0 -@@ -187,12 +185,12 @@ - ifconfig $interface:0- inet 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 -+ # Remove old address -+ 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 -- route add -host $alias_ip_address $interface:0 -+ route add -host $alias_ip_address dev $interface:0 - fi - exit_with_hooks 0 - fi -@@ -213,15 +211,15 @@ - fi - if [ $relmajor -lt 2 ] || \ - ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -- route add -net $new_network_number -+ route add -net $new_network_number dev $interface +@@ -218,7 +221,7 @@ + route add -net $new_network_number fi for router in $new_routers; do - route add default gw $router @@ -133,17 +88,11 @@ done 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 - --- client/scripts/netbsd +++ client/scripts/netbsd -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" +@@ -84,6 +84,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" fi +if [ x$IF_METRIC != x ]; then + metric_arg="metric $IF_METRIC" @@ -151,51 +100,51 @@ if [ x$reason = xMEDIUM ]; then eval "ifconfig $interface $medium" -@@ -141,7 +141,7 @@ - $new_broadcast_arg $medium" +@@ -141,7 +144,7 @@ + if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ + [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" route add $new_ip_address 127.1 >/dev/null 2>&1 for router in $new_routers; do -- route add default $router >/dev/null 2>&1 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - if [ "$new_static_routes" != "" ]; then - set $new_static_routes -@@ -207,7 +207,7 @@ - fi - 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 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - set $new_static_routes - while [ $# -gt 1 ]; do ---- client/scripts/openbsd -+++ client/scripts/openbsd -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" + route add default $router >/dev/null 2>&1 +@@ -198,7 +201,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +--- client/scripts/solaris ++++ client/scripts/solaris +@@ -79,6 +79,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" fi +if [ x$IF_METRIC != x ]; then + metric_arg="metric $IF_METRIC" +fi - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -141,7 +141,7 @@ - $new_broadcast_arg $medium" - route add $new_ip_address 127.1 >/dev/null 2>&1 + ifconfig=/sbin/ifconfig + +@@ -141,7 +144,7 @@ + if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ + [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then + eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + route add $new_ip_address 127.1 1 >/dev/null 2>&1 for router in $new_routers; do -- route add default $router >/dev/null 2>&1 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - if [ "$new_static_routes" != "" ]; then - set $new_static_routes -@@ -207,7 +207,7 @@ - fi - 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 -+ route add default $router $metric_arg dev $interface >/dev/null 2>&1 - done - set $new_static_routes - while [ $# -gt 1 ]; do + route add default $router 1 >/dev/null 2>&1 +@@ -182,7 +185,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + set $new_routers + if ping -s -n -I 1 $1 64 1; then 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 534f03524904..5ef4442d88aa 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 @@ -7,19 +7,19 @@ +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 -@@ -141,7 +144,7 @@ + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -138,7 +141,7 @@ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ - $new_broadcast_arg $medium" -+ $new_broadcast_arg $new_mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" route add $new_ip_address 127.1 >/dev/null 2>&1 for router in $new_routers; do - route add default $router $metric_arg dev $interface >/dev/null 2>&1 -@@ -198,7 +201,7 @@ + route add default $router >/dev/null 2>&1 +@@ -195,7 +198,7 @@ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 fi eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ @@ -37,10 +37,10 @@ +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 -@@ -151,7 +154,7 @@ + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -148,7 +151,7 @@ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ @@ -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" -@@ -215,7 +218,7 @@ +@@ -212,7 +215,7 @@ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 fi eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ @@ -67,19 +67,19 @@ +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 -@@ -160,7 +163,7 @@ + + if [ x$reason = xMEDIUM ]; then + # Linux doesn't do mediums (ok, ok, media). +@@ -159,7 +162,7 @@ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg -+ $new_broadcast_arg $mtu_arg ++ $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 -@@ -202,7 +205,7 @@ +@@ -201,7 +204,7 @@ ifconfig $interface:0- inet 0 fi ifconfig $interface inet $new_ip_address $new_subnet_arg \ @@ -97,10 +97,10 @@ +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 -@@ -141,7 +144,7 @@ + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -138,7 +141,7 @@ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ @@ -108,8 +108,8 @@ + $new_broadcast_arg $mtu_arg $medium" route add $new_ip_address 127.1 >/dev/null 2>&1 for router in $new_routers; do - route add default $router $metric_arg dev $interface >/dev/null 2>&1 -@@ -198,7 +201,7 @@ + route add default $router >/dev/null 2>&1 +@@ -195,7 +198,7 @@ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 fi eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ @@ -127,10 +127,10 @@ +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 -@@ -141,7 +144,7 @@ + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -138,7 +141,7 @@ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ @@ -138,8 +138,8 @@ + $new_broadcast_arg $mtu_arg $medium" route add $new_ip_address 127.1 >/dev/null 2>&1 for router in $new_routers; do - route add default $router $metric_arg dev $interface >/dev/null 2>&1 -@@ -198,7 +201,7 @@ + route add default $router >/dev/null 2>&1 +@@ -195,7 +198,7 @@ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 fi eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ @@ -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 -@@ -179,7 +181,7 @@ +@@ -179,7 +182,7 @@ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 fi eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ 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 new file mode 100644 index 000000000000..d20406625657 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch @@ -0,0 +1,67 @@ +--- client/scripts/linux ++++ client/scripts/linux +@@ -118,7 +118,7 @@ + if [ x$reason = xPREINIT ]; then + if [ x$alias_ip_address != x ]; then + # Bring down alias interface. Its routes will disappear too. +- ifconfig $interface:0- inet 0 ++ ifconfig $interface:0- inet 0.0.0.0 + fi + if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ) + then +@@ -127,7 +127,7 @@ + # Add route to make broadcast work. Do not omit netmask. + route add default dev $interface netmask 0.0.0.0 + else +- ifconfig $interface 0 up ++ ifconfig $interface 0.0.0.0 up + fi + + # We need to give the kernel some time to get the interface up. +@@ -153,12 +153,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 ] || \ +@@ -189,11 +189,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 +@@ -204,7 +204,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 +@@ -226,7 +226,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 + |