Set $user correctly in the normal case.

This commit is contained in:
hjp 2004-04-29 15:25:01 +00:00
parent 493001ee19
commit 7c90e8b0ec
2 changed files with 7 additions and 1 deletions

View File

@ -117,6 +117,7 @@ for my $ln (@df) {
(\d+)\s+(\d+)\s+(\d+)\s+
(\d+)\s+(\d+)\s+(\d+)
/x) {
$user = $1;
#print "ok: $1\n";
} elsif (/(\w+) \s+ \+- \s*
(\d+)\s+(\d+)\s+(\d+)\s+(NOT\sSTARTED|EXPIRED|\d+\.\d+\ (?:days|hours))\s+
@ -167,7 +168,6 @@ for my $ln (@df) {
}
}
else{
my $user;
my @deletemsg = ("/usr/local/dfstat/quotacheck-timestamps/$user");
unlink (@deletemsg);
}

View File

@ -20,6 +20,12 @@ sub usage {
exit(1);
}
my @path = split(/:/, $ENV{PATH});
unless (grep { $_ eq "/usr/local/bin" } @path) {
push @path, "/usr/local/bin";
}
$ENV{PATH} = join(":", @path);
while(<>) {
my ($date, $fs, $user, $bused, $bsoft, $bhard, $iused, $isoft, $ihard) = split(/\t/);
if (