defaultGWDev does not always get the right device v0.2.4
authorMichael Prokop <mika@grml.org>
Sun, 12 Oct 2008 09:06:24 +0000 (11:06 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 12 Oct 2008 09:06:24 +0000 (11:06 +0200)
debian/changelog
net-functions

index 17b2c17..adc7d57 100644 (file)
@@ -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 <mika@grml.org>  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
index a54676a..07c333f 100644 (file)
@@ -3,11 +3,11 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # 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() {