diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-10 13:53:57 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-10 13:53:57 +0000 |
commit | ac90d5413b906f5a87e6c2c174a9788523342802 (patch) | |
tree | 5bc24dd86fdc66850a677839537f59c07f5778cd | |
parent | b7a842521b50ea7dcfa7f4cb20867c1084293bc9 (diff) | |
download | drakx-ac90d5413b906f5a87e6c2c174a9788523342802.tar drakx-ac90d5413b906f5a87e6c2c174a9788523342802.tar.gz drakx-ac90d5413b906f5a87e6c2c174a9788523342802.tar.bz2 drakx-ac90d5413b906f5a87e6c2c174a9788523342802.tar.xz drakx-ac90d5413b906f5a87e6c2c174a9788523342802.zip |
fix roaming detection
-rwxr-xr-x | perl-install/standalone/drakroam | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam index 6237ca8ae..e7e6d5a89 100755 --- a/perl-install/standalone/drakroam +++ b/perl-install/standalone/drakroam @@ -236,16 +236,11 @@ sub UpdateAll { } sub UpdateRoaming { - open (PS, "ps -A |") or die ("Can't open ps\n"); - while (<PS>) { - if (/wlandetect/) { - $RoamStatus->set_text("Roaming: on"); - } - else { - $RoamStatus->set_text("Roaming: off"); - } - } - close PS; + my $status = "off"; + open (my $PS, "ps -A |") or die ("Can't open ps\n"); + grep { /wlandetect$/ } <$PS> and $status = "on"; + close $PS; + $RoamStatus->set_text("Roaming: $status"); } sub UpdateStatus { |