Package: udhcpc
Version: 0.9.8cvs20050124-3

Hi,
the script /etc/udhcpc/default.bound uses a method to flush default routes that evokes a spurious error, as in:

# sudo ifup eth0
udhcpc (v0.9.9-pre) started
Sending discover...
Sending select for xxx.xxx.xxx.xxx...
Lease of xxx.xxx.xxx.xxx obtained, lease time 51916
deleting routers
SIOCDELRT: No such process
adding dns xxx.xxx.xxx.xxx
adding dns xxx.xxx.xxx.xxx
adding dns xxx.xxx.xxx.xxx

The attached patch fixes the "SIOCDELR: No such process" and some English, at the cost of being slightly more verbose.

Going even further, the scripts could do with a "quiet" option so as not to produce output on ifup. I could whip something simple up, if the package maintainer would be interested.

-K
--- default.bound.old	2005-06-07 09:35:46.081749952 -0400
+++ default.bound	2005-06-07 09:51:41.880446464 -0400
@@ -10,9 +10,10 @@
 
 if [ -n "$router" ]
 then
-	echo "deleting routers"
-	while /sbin/route del default gw 0.0.0.0 dev $interface
-	do :
+	echo "Resetting default routes"
+	for i in `/sbin/route -n | grep ^default.*$interface`
+	do
+		route del default gw 0.0.0.0 dev $interface
 	done
 
 	for i in $router

Reply via email to