$vos="$afsbin/vos";
$pts="$afsbin/pts";
$fs="$afsbin/fs";
+$zwrite="/usr/athena/bin/zwrite";
$afs_data="/moira/afs/afs_data";
$afs_save="$afs_data.tmp";
"COURSE", "course",
"HOMEDIR", "user",
"LEASE", "dept",
+ "ORG", "org",
"PROJECT", "project",
"REF", "ref",
"SW", "sw",
# max[ (2*free space) - (unused quota) ]
# = max(2*total - usage - alloc)
#
-# Note: This routine does not actually adjust the quota; the caller
-# should use afs_quota_adj();
+# Note: This routine does not actually adjust the quota;
+# the calling routine should use afs_quota_adj();
sub afs_find
{
local($cell,$type,$quota,@except) = @_;
local($j,$k);
- local(@max) = '';
+ local(@max) = ("", "", -10000000);
&afs_lock;
chop(@afs_data);
#
sub afs_quota_adj
{
- local($cell,$asrv,$apart,$adj) = @_;
+ local($cell,$asrv,$apart,$adj,$dusage) = @_;
local($found) = 0;
&afs_lock;
for (@afs_data) {
local ($c, $as, $ap, $t, $total, $used, $alloc) = split(/\s+/,$_);
if ($c eq $cell && $as eq $asrv && $ap eq $apart) {
+ $dusage = $used unless ($dusage);
$alloc += $adj;
- $_ = join(' ',$c,$asrv,$apart,$t,$total,$used,$alloc);
+ $_ = join(' ',$c,$asrv,$apart,$t,$total,$dusage,$alloc);
$found = 1;
}
print SRV "$_\n";