summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-01 03:44:09 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-01 03:44:09 +0000
commit9fcb68ad8748f2d85ba27f36d6c1ff08ba5f8200 (patch)
treeba3c53260fc0bb990cc5c38a0007a556eacd81e9 /perl-install/network
parent20870dd529a590c576b9ac0efce8ebb43170c1d2 (diff)
downloaddrakx-backup-do-not-use-9fcb68ad8748f2d85ba27f36d6c1ff08ba5f8200.tar
drakx-backup-do-not-use-9fcb68ad8748f2d85ba27f36d6c1ff08ba5f8200.tar.gz
drakx-backup-do-not-use-9fcb68ad8748f2d85ba27f36d6c1ff08ba5f8200.tar.bz2
drakx-backup-do-not-use-9fcb68ad8748f2d85ba27f36d6c1ff08ba5f8200.tar.xz
drakx-backup-do-not-use-9fcb68ad8748f2d85ba27f36d6c1ff08ba5f8200.zip
do not use find over grep, just find
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/tools.pm13
1 files changed, 3 insertions, 10 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 6fa8173a2..d77a934e1 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -239,26 +239,19 @@ sub find_matching_interface {
#- returns first dhcp interface started on boot
sub get_default_ethernet_dhcp_interface {
my ($intf) = @_;
- find {
- text2bool($intf->{$_}{ONBOOT}) && $intf->{$_}{BOOTPROTO} eq 'dhcp'
- } grep { /^eth\d+/ } sort keys %$intf;
+ find { /^eth\d+/ && text2bool($intf->{$_}{ONBOOT}) && $intf->{$_}{BOOTPROTO} eq 'dhcp' } sort keys %$intf;
}
-
#- returns first ppp interface started on boot
sub get_default_ppp_interface {
my ($intf) = @_;
- find {
- text2bool($intf->{$_}{ONBOOT})
- } grep { /^ppp\d+/ } sort keys %$intf;
+ find { /^ppp\d+/ && text2bool($intf->{$_}{ONBOOT}) } sort keys %$intf;
}
#- returns ippp interface dialed on boot
sub get_default_ippp_interface {
my ($intf) = @_;
- find {
- text2bool($intf->{$_}{ONBOOT}) && text2bool($intf->{$_}{DIAL_ON_IFUP})
- } grep { /^ippp\d+/ } sort keys %$intf;
+ find { /^ippp\d+/ && text2bool($intf->{$_}{ONBOOT}) && text2bool($intf->{$_}{DIAL_ON_IFUP}) } sort keys %$intf;
}
#- returns gateway interface if found