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+)\s+
|
||||||
(\d+)\s+(\d+)\s+(\d+)
|
(\d+)\s+(\d+)\s+(\d+)
|
||||||
/x) {
|
/x) {
|
||||||
|
$user = $1;
|
||||||
#print "ok: $1\n";
|
#print "ok: $1\n";
|
||||||
} elsif (/(\w+) \s+ \+- \s*
|
} elsif (/(\w+) \s+ \+- \s*
|
||||||
(\d+)\s+(\d+)\s+(\d+)\s+(NOT\sSTARTED|EXPIRED|\d+\.\d+\ (?:days|hours))\s+
|
(\d+)\s+(\d+)\s+(\d+)\s+(NOT\sSTARTED|EXPIRED|\d+\.\d+\ (?:days|hours))\s+
|
||||||
|
@ -167,7 +168,6 @@ for my $ln (@df) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
my $user;
|
|
||||||
my @deletemsg = ("/usr/local/dfstat/quotacheck-timestamps/$user");
|
my @deletemsg = ("/usr/local/dfstat/quotacheck-timestamps/$user");
|
||||||
unlink (@deletemsg);
|
unlink (@deletemsg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,12 @@ sub usage {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my @path = split(/:/, $ENV{PATH});
|
||||||
|
unless (grep { $_ eq "/usr/local/bin" } @path) {
|
||||||
|
push @path, "/usr/local/bin";
|
||||||
|
}
|
||||||
|
$ENV{PATH} = join(":", @path);
|
||||||
|
|
||||||
while(<>) {
|
while(<>) {
|
||||||
my ($date, $fs, $user, $bused, $bsoft, $bhard, $iused, $isoft, $ihard) = split(/\t/);
|
my ($date, $fs, $user, $bused, $bsoft, $bhard, $iused, $isoft, $ihard) = split(/\t/);
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue