From ee90af4458c61141f5850784c806a29074cb941f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 27 Feb 2003 13:26:36 +0000 Subject: - better check /sbin/ifconfig is executable rather than simply exists - fix lan configuration window filling ... --- perl-install/standalone/drakconnect | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 360bd1895..741bfc523 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -311,14 +311,14 @@ $in->exit(0); sub build_list { foreach my $i (0..$#all_cards) { my ($ip, $state); - if (-e "/sbin/ifconfig") { + if (-x "/sbin/ifconfig") { local $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "eth$i"`; /inet addr\:$ip_regexp/; - $ip = if_($1 && $2 && $3, "$1.$2.$3.$4"); + $ip = if_($1 && $2 && $3, "$1.$2.$3.$4"); $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig`; $state = /eth$i/ ? "up" : "down"; } else { - $ip = $intf->{"eth$_"}{IPADDR}; + $ip = $intf->{"eth$i"}{IPADDR}; $state = "n/a"; } $tree_model->append_set(undef, [ map_index { $::i => $_ } (gtkcreate_pixbuf("eth_card_mini2.png"), "eth$i", $ip , $intf->{"eth$i"}{BOOTPROTO}, $all_cards[$i][1], $state) ])->free; -- cgit v1.2.1