summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakroam
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-10 13:53:57 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-10 13:53:57 +0000
commitac90d5413b906f5a87e6c2c174a9788523342802 (patch)
tree5bc24dd86fdc66850a677839537f59c07f5778cd /perl-install/standalone/drakroam
parentb7a842521b50ea7dcfa7f4cb20867c1084293bc9 (diff)
downloaddrakx-backup-do-not-use-ac90d5413b906f5a87e6c2c174a9788523342802.tar
drakx-backup-do-not-use-ac90d5413b906f5a87e6c2c174a9788523342802.tar.gz
drakx-backup-do-not-use-ac90d5413b906f5a87e6c2c174a9788523342802.tar.bz2
drakx-backup-do-not-use-ac90d5413b906f5a87e6c2c174a9788523342802.tar.xz
drakx-backup-do-not-use-ac90d5413b906f5a87e6c2c174a9788523342802.zip
fix roaming detection
Diffstat (limited to 'perl-install/standalone/drakroam')
-rwxr-xr-xperl-install/standalone/drakroam15
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 {