summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-04 14:25:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-04 14:25:49 +0000
commit51d6259470fb1d02503a2c0de2c806026d87c396 (patch)
tree5c7671b3a9121c099648c82007f8615aaaa022c8 /perl-install/network
parent823defcb7c1e66a5aafb9d94ca9c7ecef238f12c (diff)
downloaddrakx-backup-do-not-use-51d6259470fb1d02503a2c0de2c806026d87c396.tar
drakx-backup-do-not-use-51d6259470fb1d02503a2c0de2c806026d87c396.tar.gz
drakx-backup-do-not-use-51d6259470fb1d02503a2c0de2c806026d87c396.tar.bz2
drakx-backup-do-not-use-51d6259470fb1d02503a2c0de2c806026d87c396.tar.xz
drakx-backup-do-not-use-51d6259470fb1d02503a2c0de2c806026d87c396.zip
use if_() where possible (as reported by perl_checker)
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/netconnect.pm12
-rw-r--r--perl-install/network/network.pm2
2 files changed, 5 insertions, 9 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 09cbba81c..6409ba791 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -33,14 +33,10 @@ sub intro {
$connected = 0;
}
my @l = (
- !$connected && -e $connect_file ? { description => N("Connect"),
- c => 1 } : (),
- $connected && -e $disconnect_file ? { description => N("Disconnect"),
- c => 2 } : (),
- { description => N("Configure the connection"),
- c => 3 },
- { description => N("Cancel"),
- c => 4 },
+ if_(!$connected && -e $connect_file, { description => N("Connect"), c => 1 }),
+ if_($connected && -e $disconnect_file, { description => N("Disconnect"), c => 2 }),
+ { description => N("Configure the connection"), c => 3 },
+ { description => N("Cancel"), c => 4 },
);
my $e = $in->ask_from_listf(N("Internet connection & configuration"),
translate($text),
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index a7994a18a..9043e9699 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -133,7 +133,7 @@ sub write_interface_conf {
ONBOOT => bool2yesno(!member($intf->{DEVICE}, map { $_->{device} } detect_devices::probeall())),
if_($::o->{miscellaneous}{track_network_id}, HWADDR => $hwaddr)
});
- setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR), $intf->{wireless_eth} ? qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV) : ());
+ setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR), if_($intf->{wireless_eth}, qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV)));
}
sub add2hosts {