From 155e343b82373e216272b9e85944d8510106c636 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 1 Jun 2010 22:23:58 +0000 Subject: Do not use netstat to fetch default gateway interface but other faster commands to avoid problems on large interface setups. --- sbin/dhclient-script | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sbin') diff --git a/sbin/dhclient-script b/sbin/dhclient-script index 35ce76f..132946d 100755 --- a/sbin/dhclient-script +++ b/sbin/dhclient-script @@ -211,9 +211,8 @@ if [ -f /etc/dhclient-enter-hooks ]; then fi fi -if [ -x $NETSTAT ]; then - $LOGGER "netstat" - if_defaultroute=`$NETSTAT -rn | $GREP "^default" | $AWK '{print $6}'` +if [ -x $ROUTE ]; then + if_defaultroute=`$ROUTE get default | $GREP interface | $AWK '{print $2}'` else $LOGGER "if_defaultroute" if_defaultroute="x" -- cgit v1.1