summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakconnect
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-22 17:33:01 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-22 17:33:01 +0000
commitd02575eaeb2cb37c8e558fdb21b064d47cee8712 (patch)
tree4dedb914a537256ee281c64c155b146edc8f7745 /perl-install/standalone/drakconnect
parentd12cf1a534c85d14d6613fde2fce570888d3f7da (diff)
downloaddrakx-d02575eaeb2cb37c8e558fdb21b064d47cee8712.tar
drakx-d02575eaeb2cb37c8e558fdb21b064d47cee8712.tar.gz
drakx-d02575eaeb2cb37c8e558fdb21b064d47cee8712.tar.bz2
drakx-d02575eaeb2cb37c8e558fdb21b064d47cee8712.tar.xz
drakx-d02575eaeb2cb37c8e558fdb21b064d47cee8712.zip
workaround #3341: display "Bad ip" instead of a blank field if ip
wasn't correctly parsed as an ip ?
Diffstat (limited to 'perl-install/standalone/drakconnect')
-rwxr-xr-xperl-install/standalone/drakconnect3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index f2bf3e368..e0f0d7d75 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -294,8 +294,7 @@ sub build_list() {
my ($ip, $state);
if (-x "/sbin/ifconfig") {
local $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "eth$i"`;
- /inet addr\:$ip_regexp/ or warn "Bad Ip\n";
- $ip = if_($1 && $2 && $3, "$1.$2.$3.$4");
+ $ip = /inet addr\:$ip_regexp/ ? "$1.$2.$3.$4" : N("Bad Ip");
$_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig`;
$state = /eth$i/ ? "up" : "down";
} else {