]> git.etc.gen.nz Git - spong.git/commitdiff
replaced foreach() in main read loop. while (shift) was dumping bits on the floor spong-2_7_6a
authorStephen L Johnson <sjohnson@monsters.org>
Fri, 28 Sep 2001 19:20:18 +0000 (19:20 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Fri, 28 Sep 2001 19:20:18 +0000 (19:20 +0000)
src/lib/Spong/Client/plugins/check_disk

index ecffec7879206510f429170397efbf258d97580c..f5adebcbbaec5a35de027b12c4d064ff52573f23 100755 (executable)
@@ -4,7 +4,7 @@ $CHECKFUNCS{'disk'} = \&check_disk;
 # This check check the amount of free diskspace for all of the mounted disk
 # partitions and the the amount of free swapspace.
 
-# $Id: check_disk,v 1.3 2001/09/16 18:08:39 sljohnson Exp $
+# $Id: check_disk,v 1.4 2001/09/28 19:20:18 sljohnson Exp $
 
 use Spong::SafeExec qw(safe_exec);
 
@@ -17,7 +17,7 @@ sub check_disk {
    $message = shift(@msg);  # Header
 
  DFPIPE:
-   while( shift(@msg) ) {
+   foreach ( @msg ) {
       if( m!^(\S+)\s.*?\s(\d+)\%\s+[^/]*(/.*)$! ) {
         my( $rawfs, $percent, $name ) = ( $1, $2, $3 );
         my $skip;