From ac90d5413b906f5a87e6c2c174a9788523342802 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 10 Aug 2004 13:53:57 +0000 Subject: fix roaming detection --- perl-install/standalone/drakroam | 15 +++++---------- 1 file 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 () { - 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 { -- cgit v1.2.1