From 493001ee1952e71540d1ba7e7521bf5023b30e35 Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 26 Apr 2004 08:33:17 +0000 Subject: [PATCH] Skip rest of loop for unparseable lines. --- quotacheck/quotacheck.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quotacheck/quotacheck.pl b/quotacheck/quotacheck.pl index b6b0e85..292de10 100644 --- a/quotacheck/quotacheck.pl +++ b/quotacheck/quotacheck.pl @@ -110,6 +110,7 @@ for my $ln (@df) { if ($fs =~ m|^/dev/|) { open REPQUOTA, "@@@repquota@@@ $mount 2>/dev/null |" or die "cannot call @@@repquota@@@: $!"; while () { + next if ($. <= 2); # ignore header lines my $msg = ""; my $user; if (/(\w+) \s+ -- \s* @@ -142,9 +143,8 @@ for my $ln (@df) { print "file limit: $1: $6 > ($7 $8) $9\n"; $msg .= "\n\n" . warnmsg($mount, $6, $7, $8, $9, "Files", $user); } else { - if ($. > 2) { # ignore header lines - print "$mount: $.: unparseable: $_"; - } + print "$mount: $.: unparseable: $_"; + next; } if ($msg) { my $timestamp = "/usr/local/dfstat/quotacheck-timestamps/$user";