From b7dba361aa049e50d9fef75ce70f172ce7bd066c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 11 Aug 2004 05:35:27 +0000 Subject: (UpdateStatus) simplify --- perl-install/standalone/drakroam | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'perl-install/standalone/drakroam') diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam index cee4dab5a..2870f2554 100755 --- a/perl-install/standalone/drakroam +++ b/perl-install/standalone/drakroam @@ -174,22 +174,18 @@ sub UpdateStatus() { my $CurrentMode = ""; my $CurrentWEP = ""; my $CurrentSignal = "-"; - my @output; print("Updating\n"); - @output = run_program::get_stdout($IWConfig); local $_; - foreach (@output) { + foreach (run_program::get_stdout($IWConfig)) { if (/ESSID:"(\S*)"/) { $CurrentNet = $1 } if (/Mode:(\S*)\s/) { $CurrentMode = $1 } if (/key:(\S*)\s/) { $CurrentWEP = $1 } if (m!Quality:(\S*)/!) { $CurrentSignal = $1 } } - @output = run_program::get_stdout($IFConfig, $device); - foreach (@output) { + foreach (run_program::get_stdout($IFConfig, $device)) { if (/inet addr:(\S*)\s/) { $CurrentIP = $1 } } - @output = run_program::get_stdout($route); - foreach (@output) { + foreach (run_program::get_stdout($route)) { if (/default\s*(\S*)\s/) { $CurrentGW = $1 } else { $CurrentGW = "---.---.---.---" } } -- cgit v1.2.1