BTS

Issue550

Title defaultGWDev does not always get the right device
Priority bug Status resolved
Superseder Nosy List mru
Assigned To Topics

Created on 2008-10-12.08:59:45 by mru, last changed 2008-10-12.09:15:35 by mika.

Messages
msg1593 (view) Author: mika Date: 2008-10-12.09:15:32
We believe that your issue has been closed by the upload of
Version 0.2.4 of grml-network from Michael Prokop <mika@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 12 Oct 2008 11:04:46 +0200
Source: grml-network
Binary: grml-network
Architecture: source all
Version: 0.2.4
Distribution: unstable
Urgency: low
Maintainer: Michael Prokop <mika@grml.org>
Changed-By: Michael Prokop <mika@grml.org>
Description: 
 grml-network - network related helper scripts
Changes: 
 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]
Files: 
 86e7f5d1dcf2fade0e95c2241992dbd3 618 grml optional grml-network_0.2.4.dsc
 defcb44fd2cf44439ef5e3ef19c8b2f8 88161 grml optional grml-network_0.2.4.tar.gz
 6fa0471074d3918d2481f3f021808150 91452 grml optional grml-network_0.2.4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFI8b5x2N9T+zficugRAglGAJ0d7opqVwzkDNKLQUBn6rSw3mTbfwCeLKHG
gjD+ccjiG+zs1Y/V7LdD488=
=7oZm
-----END PGP SIGNATURE-----
msg1592 (view) Author: mru Date: 2008-10-12.08:59:44
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.

Use 
route -en | awk '/^0.0.0.0/ {print $8}'
instead of
ip r s | awk '/^default/ {print $5}'
History
Date User Action Args
2008-10-12 09:15:35mikasetstatus: unread -> resolved
messages: + msg1593
2008-10-12 08:59:45mrucreate