summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-04-21 13:33:05 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-04-21 13:33:05 +0000
commit3e296ab8515cf7186c263d9fe52e24c53d3260d6 (patch)
tree106276bb5e26f3f90fd45b716de09e47b6426071
parentd91533a5895e0b57ec233637e0310020676fe38e (diff)
downloaddrakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar
drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar.gz
drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar.bz2
drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar.xz
drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.zip
(ConnectNow) simplify
-rwxr-xr-xperl-install/standalone/drakroam4
1 files changed, 1 insertions, 3 deletions
diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam
index d8f360b7b..eed78b96d 100755
--- a/perl-install/standalone/drakroam
+++ b/perl-install/standalone/drakroam
@@ -356,9 +356,7 @@ sub ConnectNow {
my @command = "";
push @command, "$IWConfig $device essid $KnownList->{data}[$row][0] ";
my %commands = (1 => 'mode', 2 => 'channel', 4 => 'key');
- foreach (my ($key, $cmd) = each %commands) {
- push @command, "$cmd $KnownList->{data}[$row][$key] " if $KnownList->{data}[$row][$key];
- }
+ push @command, map { "$commands{$_} $KnownList->{data}[$row][$_] " } grep { $KnownList->{data}[$row][$_] } keys %commands;
push @command, "; ";
if ($KnownList->{data}[$row][3]) {
push @command, "$IFConfig $device up; $DHClient $device";