Set $user correctly in the normal case.
This commit is contained in:
parent
493001ee19
commit
7c90e8b0ec
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue