[arch-commits] Commit in dhcp/trunk (dhclient-script-pathFixes.patch)

Daniel Isenmann daniel at archlinux.org
Sun Jan 17 14:54:37 UTC 2010


    Date: Sunday, January 17, 2010 @ 09:54:36
  Author: daniel
Revision: 63454

needed patch

Added:
  dhcp/trunk/dhclient-script-pathFixes.patch

---------------------------------+
 dhclient-script-pathFixes.patch |  139 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)

Added: dhclient-script-pathFixes.patch
===================================================================
--- dhclient-script-pathFixes.patch	                        (rev 0)
+++ dhclient-script-pathFixes.patch	2010-01-17 14:54:36 UTC (rev 63454)
@@ -0,0 +1,139 @@
+--- linux	2008-05-23 15:56:07.000000000 +0200
++++ linux_new	2010-01-17 15:40:45.000000000 +0100
+@@ -8,7 +8,7 @@
+ 
+ # 0. This script is based on the netbsd script supplied with dhcp-970306.
+ 
+-# 1. ifconfig down apparently deletes all relevant routes and flushes
++# 1. /sbin/ifconfig down apparently deletes all relevant routes and flushes
+ # the arp cache, so this doesn't need to be done explicitly.
+ 
+ # 2. The alias address handling here has not been tested AT ALL.
+@@ -111,16 +111,16 @@
+ 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
++    /sbin/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 \
++    /sbin/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
++    # Add /sbin/route to make broadcast work. Do not omit netmask.
++    /sbin/route add default dev $interface netmask 0.0.0.0
+   else
+-    ifconfig $interface 0 up
++    /sbin/ifconfig $interface 0 up
+   fi
+ 
+   # We need to give the kernel some time to get the interface up.
+@@ -147,36 +147,36 @@
+   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
++    /sbin/ifconfig $interface:0- inet 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
++    /sbin/ifconfig $interface inet 0 down
+ 
+   fi
+   if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+      [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+ 
+-    ifconfig $interface inet $new_ip_address $new_subnet_arg \
++    /sbin/ifconfig $interface inet $new_ip_address $new_subnet_arg \
+ 							$new_broadcast_arg
+-    # Add a network route to the computed network address.
++    # Add a network /sbin/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
++      /sbin/route add -net $new_network_number $new_subnet_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
++	/sbin/route add -host $router dev $interface
+       fi
+-      route add default gw $router
++      /sbin/route add default gw $router
+     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
++    /sbin/ifconfig $interface:0- inet 0
++    /sbin/ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
++    /sbin/route add -host $alias_ip_address $interface:0
+   fi
+   make_resolv_conf
+   exit_with_hooks 0
+@@ -186,46 +186,46 @@
+    || [ x$reason = xSTOP ]; then
+   if [ x$alias_ip_address != x ]; then
+     # Turn off alias interface.
+-    ifconfig $interface:0- inet 0
++    /sbin/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
++    /sbin/ifconfig $interface inet 0 down
+   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
++    /sbin/ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
++    /sbin/route add -host $alias_ip_address $interface:0
+   fi
+   exit_with_hooks 0
+ fi
+ 
+ if [ x$reason = xTIMEOUT ]; then
+   if [ x$alias_ip_address != x ]; then
+-    ifconfig $interface:0- inet 0
++    /sbin/ifconfig $interface:0- inet 0
+   fi
+-  ifconfig $interface inet $new_ip_address $new_subnet_arg \
++  /sbin/ifconfig $interface inet $new_ip_address $new_subnet_arg \
+ 					$new_broadcast_arg
+   set $new_routers
+   if ping -q -c 1 $1; 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
+-      route add -host $alias_ip_address dev $interface:0
++      /sbin/ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
++      /sbin/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
++      /sbin/route add -net $new_network_number
+     fi
+     for router in $new_routers; do
+       if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+-	route add -host $router dev $interface
++	/sbin/route add -host $router dev $interface
+       fi
+-      route add default gw $router
++      /sbin/route add default gw $router
+     done
+     make_resolv_conf
+     exit_with_hooks 0
+   fi
+-  ifconfig $interface inet 0 down
++  /sbin/ifconfig $interface inet 0 down
+   exit_with_hooks 1
+ fi
+ 




More information about the arch-commits mailing list