linamh/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch

71 lines
2.3 KiB
Diff
Raw Normal View History

--- client/scripts/linux
+++ 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