From 7c90e8b0ec2b9286d4dc18e2cb0156b580bbb36c Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 29 Apr 2004 15:25:01 +0000 Subject: [PATCH] Set $user correctly in the normal case. --- quotacheck/quotacheck.pl | 2 +- quotacheck/quotagraph | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/quotacheck/quotacheck.pl b/quotacheck/quotacheck.pl index 292de10..bbde4c7 100644 --- a/quotacheck/quotacheck.pl +++ b/quotacheck/quotacheck.pl @@ -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); } diff --git a/quotacheck/quotagraph b/quotacheck/quotagraph index 39c7675..f435d1f 100755 --- a/quotacheck/quotagraph +++ b/quotacheck/quotagraph @@ -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 (