Skip rest of loop for unparseable lines.
This commit is contained in:
parent
ab957ed401
commit
493001ee19
|
@ -110,6 +110,7 @@ for my $ln (@df) {
|
||||||
if ($fs =~ m|^/dev/|) {
|
if ($fs =~ m|^/dev/|) {
|
||||||
open REPQUOTA, "@@@repquota@@@ $mount 2>/dev/null |" or die "cannot call @@@repquota@@@: $!";
|
open REPQUOTA, "@@@repquota@@@ $mount 2>/dev/null |" or die "cannot call @@@repquota@@@: $!";
|
||||||
while (<REPQUOTA>) {
|
while (<REPQUOTA>) {
|
||||||
|
next if ($. <= 2); # ignore header lines
|
||||||
my $msg = "";
|
my $msg = "";
|
||||||
my $user;
|
my $user;
|
||||||
if (/(\w+) \s+ -- \s*
|
if (/(\w+) \s+ -- \s*
|
||||||
|
@ -142,9 +143,8 @@ for my $ln (@df) {
|
||||||
print "file limit: $1: $6 > ($7 $8) $9\n";
|
print "file limit: $1: $6 > ($7 $8) $9\n";
|
||||||
$msg .= "\n\n" . warnmsg($mount, $6, $7, $8, $9, "Files", $user);
|
$msg .= "\n\n" . warnmsg($mount, $6, $7, $8, $9, "Files", $user);
|
||||||
} else {
|
} else {
|
||||||
if ($. > 2) { # ignore header lines
|
print "$mount: $.: unparseable: $_";
|
||||||
print "$mount: $.: unparseable: $_";
|
next;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ($msg) {
|
if ($msg) {
|
||||||
my $timestamp = "/usr/local/dfstat/quotacheck-timestamps/$user";
|
my $timestamp = "/usr/local/dfstat/quotacheck-timestamps/$user";
|
||||||
|
|
Loading…
Reference in New Issue