85 lines
2.9 KiB
Diff
85 lines
2.9 KiB
Diff
|
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
|
||
|
Date: 2010-02-14
|
||
|
Initial Package Version: 3.0.3
|
||
|
Origin: gentoo patch dhcp-3.0.3-dhclient-no-down.patch
|
||
|
Upstream Status:
|
||
|
Description:
|
||
|
|
||
|
diff -Naur dhcp-3.1.3.orig/client/scripts/linux dhcp-3.1.3/client/scripts/linux
|
||
|
--- dhcp-3.1.3.orig/client/scripts/linux 2010-02-14 07:11:40.663800717 +0000
|
||
|
+++ dhcp-3.1.3/client/scripts/linux 2010-02-14 07:12:29.183552495 +0000
|
||
|
@@ -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.
|
||
|
@@ -155,12 +155,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 ] || \
|
||
|
@@ -179,7 +179,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
|
||
|
@@ -191,11 +191,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
|
||
|
@@ -206,7 +206,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
|
||
|
@@ -227,7 +227,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
|
||
|
|