Fallback to iproute if ifconfig doesn't work.

This fix applies the patch provided by Maccied Grela in [bugs:#26]


git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@155 3873ddee-7413-0410-b6c4-c2c57c1ab35a
This commit is contained in:
wimpunk 2013-10-28 22:38:56 +00:00
parent 9fa0e5872b
commit b0e6b06188

View file

@ -1958,6 +1958,7 @@ sub get_ip {
} elsif ($use eq 'if') { } elsif ($use eq 'if') {
$skip = opt('if-skip', $h) || ''; $skip = opt('if-skip', $h) || '';
$reply = `ifconfig $arg 2> /dev/null`; $reply = `ifconfig $arg 2> /dev/null`;
$reply = `ip addr list dev $arg 2> /dev/null` if $?;
$reply = '' if $?; $reply = '' if $?;
} elsif ($use eq 'cmd') { } elsif ($use eq 'cmd') {