summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-18 17:24:39 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-18 17:24:39 +0000
commitc86639ca91374a18b5f37ebca26207bca9cb242f (patch)
tree5514b1e9c3926b203ca952021c3d8295558348cf
parentc64cdd4919436056ed22cee7b83047f1ee35961a (diff)
downloaddrakx-c86639ca91374a18b5f37ebca26207bca9cb242f.tar
drakx-c86639ca91374a18b5f37ebca26207bca9cb242f.tar.gz
drakx-c86639ca91374a18b5f37ebca26207bca9cb242f.tar.bz2
drakx-c86639ca91374a18b5f37ebca26207bca9cb242f.tar.xz
drakx-c86639ca91374a18b5f37ebca26207bca9cb242f.zip
replace to_bool(grep) call with any
-rw-r--r--perl-install/network/tools.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index e77bd471f..de3f8a4b5 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -264,7 +264,7 @@ sub get_default_gateway_interface {
sub get_interface_status {
my ($gw_intf) = @_;
my @routes = `$::prefix/sbin/ip route show`;
- my $is_up = to_bool(grep { /\s+dev\s+$gw_intf(?:\s+|$)/ } @routes);
+ my $is_up = any { /\s+dev\s+$gw_intf(?:\s+|$)/ } @routes;
my ($gw_address) = join('', @routes) =~ /^default\s+via\s+(\S+).*\s+dev\s+$gw_intf(?:\s+|$)/m;
return $is_up, $gw_address;
}