1 #!/afs/athena/contrib/perl/perl
2 # Usage: afs_quota path quota
4 require "/moira/bin/afs_utils.pl";
6 die "Usage: $0 path quota\n" unless (@ARGV==2);
9 $path =~ s:^/afs/([^.]):/afs/.\1:;
11 system("$fs checkb >/dev/null");
13 open(PROG,"$fs lv $path|");
16 die "Unable to get information about $path\n" if ($?);
18 @tmp = split(/\s+/, shift(@fs));
20 @tmp = split(/\s+/, shift(@fs));
23 open(PROG,"$fs whichcell $path|");
26 die "Unable to get information about $path\n" if ($?);
29 ($cell=pop(@tmp)) =~ s/^'(.*)'$/\1/;
32 open(PROG,"$vos ex $vname -cell $cell|");
35 die "Unable to get volume information about $vname ($path)\n" if ($?);
37 shift(@tmp), $_ = shift(@tmp);
38 ($asrv,$asrv,$apart) = split(/\s+/,$_);
40 system("$fs","sq",$path,$newq);
41 die "Unable to change quota on $path\n" if ($?);
42 &afs_quota_adj($cell,$asrv,$apart,$newq-$oldq);
45 #$stat_qa = &afs_quota_adj($cell,$asrv,$apart,($stat_fs ? 0 : $newq-$oldq));
46 #die "Unable to change quota on $path\n" if ($stat_fs && $stat_qa);
47 #warn "Unable to change quota on $path\n" if ($stat_fs);