From 5da848d93e8bc4069354ceab728f4c43c707fd5b Mon Sep 17 00:00:00 2001 From: Wim Vinckier Date: Mon, 28 Oct 2013 23:39:40 +0100 Subject: [PATCH] Fallback to iproute if ifconfig doesn't work. This fix applies the patch provided by Maccied Grela in [bugs:#26] --- ddclient | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index 81b19cc..59aaee0 100755 --- a/ddclient +++ b/ddclient @@ -1,7 +1,7 @@ #!/usr/bin/perl -w #!/usr/local/bin/perl -w ###################################################################### -# $Id: ddclient 154 2013-10-28 21:37:16Z wimpunk $ +# $Id: ddclient 155 2013-10-28 22:38:56Z wimpunk $ # # DDCLIENT - a Perl client for updating DynDNS information # @@ -20,7 +20,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my ($VERSION) = q$Revision: 154 $ =~ /(\d+)/; +my ($VERSION) = q$Revision: 155 $ =~ /(\d+)/; my $version = "3.8.0-r". $VERSION; my $programd = $0; @@ -1958,6 +1958,7 @@ sub get_ip { } elsif ($use eq 'if') { $skip = opt('if-skip', $h) || ''; $reply = `ifconfig $arg 2> /dev/null`; + $reply = `ip addr list dev $arg 2> /dev/null` if $?; $reply = '' if $?; } elsif ($use eq 'cmd') {