summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {