summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network/tools.pm')
-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