From d02575eaeb2cb37c8e558fdb21b064d47cee8712 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 22 May 2003 17:33:01 +0000 Subject: workaround #3341: display "Bad ip" instead of a blank field if ip wasn't correctly parsed as an ip ? --- perl-install/standalone/drakconnect | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'perl-install/standalone') 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 { -- cgit v1.2.1