diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-04-21 13:33:05 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-04-21 13:33:05 +0000 |
commit | 3e296ab8515cf7186c263d9fe52e24c53d3260d6 (patch) | |
tree | 106276bb5e26f3f90fd45b716de09e47b6426071 /perl-install/standalone/drakroam | |
parent | d91533a5895e0b57ec233637e0310020676fe38e (diff) | |
download | drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar.gz drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar.bz2 drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.tar.xz drakx-3e296ab8515cf7186c263d9fe52e24c53d3260d6.zip |
(ConnectNow) simplify
Diffstat (limited to 'perl-install/standalone/drakroam')
-rwxr-xr-x | perl-install/standalone/drakroam | 4 |
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"; |