From: Michael Prokop Date: Sun, 12 Oct 2008 09:06:24 +0000 (+0200) Subject: defaultGWDev does not always get the right device X-Git-Tag: v0.2.4^0 X-Git-Url: http://git.grml.org/?p=grml-network.git;a=commitdiff_plain;h=290ade9e6e0cc6a4370f12e518e0c567cf2fe1fe defaultGWDev does not always get the right device --- diff --git a/debian/changelog b/debian/changelog index 17b2c17..adc7d57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +grml-network (0.2.4) unstable; urgency=low + + * net-functions: if there is a default route not via an ip + address but just for a device defaultGWDev returns the wrong + device name, as the device is in the third row not the fifth. + Fix this issue, thanks - Ulrich Dangel. [Closes: issue550] + + -- Michael Prokop Sun, 12 Oct 2008 11:04:46 +0200 + grml-network (0.2.3) unstable; urgency=low * Depend on grml-etc-core, as several scripts use diff --git a/net-functions b/net-functions index a54676a..07c333f 100644 --- a/net-functions +++ b/net-functions @@ -3,11 +3,11 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Okt 12 09:41:32 CEST 2006 [mika] ################################################################################ defaultGWDev() { - ip r s | awk '/^default/ {print $5}' + # ip r s | awk '/^default/ {print $5}' + route -en | awk '/^0.0.0.0/ {print $8}' } getLanDevices() {