]> andersk Git - moira.git/blobdiff - incremental/afs_utils.pl
make get_host not fail if user doesn't exist
[moira.git] / incremental / afs_utils.pl
index c5e5415215811eecc5ad7b39dbcf216b32224839..06cbecb0fcac06f28a0cb95c26928ee41fe1492a 100644 (file)
@@ -4,6 +4,7 @@ $afsbin="/moira/bin";
 $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";
@@ -67,8 +68,8 @@ sub afs_unlock
 #    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
 {
@@ -100,7 +101,7 @@ sub afs_find
 #
 sub afs_quota_adj
 {
-    local($cell,$asrv,$apart,$adj) = @_;
+    local($cell,$asrv,$apart,$adj,$dusage) = @_;
     local($found) = 0;
 
     &afs_lock;
@@ -109,8 +110,9 @@ sub afs_quota_adj
     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";
This page took 0.07254 seconds and 4 git commands to generate.