5 # This script zeros quotas for uid's which are not in standard input
6 # Note that the input must be sorted in increasing order by uid.
9 set MR_SETQUOTA = 47836471
11 # Checking for /etc/zero_old_quotas allows us to release this program
12 # one server at a time.
14 if ( -f /etc/zero_old_quotas ) then
19 # set args = $< will NOT work. $< will be treated as a single word
22 if (${#args} != 2) break # end of input
25 @ checksorted = ($current_uid <= $uid)
27 if (checksorted == 0) then
28 echo "Input not sorted"
32 # zero all quotas between current_uid and uid (not including uid)
33 if ($current_uid != $uid) then
35 setquota -r $dev $current_uid $uid_high 0
39 @ current_uid = $uid + 1
43 # zero all remaining quotas, except for nobody (32767).
44 if ($current_uid != 32767) setquota -r $dev $current_uid 32766 0