Update quota tests to work with project quota (and xfs_quota).

Merge of master-melb:xfs-cmds:24813a by kenmcd.
This commit is contained in:
Nathan Scott
2005-12-14 05:04:52 +00:00
parent 876970e2a2
commit 9013897f9f
10 changed files with 165 additions and 240 deletions
+28 -27
View File
@@ -48,10 +48,15 @@ _require_quota
# setup a default run
[ -z "$MOUNT_OPTIONS" ] && export MOUNT_OPTIONS="-o uquota"
blksoft=100
blkhard=500
inosoft=4
inohard=10
bsoft=100
bhard=500
isoft=4
ihard=10
_filter_report()
{
tr -s '[:space:]' | sed -e "s/^\#$id /[NAME] /g" -e "s/^#0 /[ROOT] /g"
}
# The actual point at which limit enforcement takes place for the
# hard block limit is variable depending on filesystem blocksize,
@@ -59,19 +64,19 @@ inohard=10
# (ie. blksize less than limit but not unduly less - ~85% is kind)
# nowadays we actually get much closer to the limit before EDQUOT.
#
_filter_and_check_blocks()
_filter_and_check_blks()
{
perl -npe '
if (/^'$name'\s+([-|+]){2}\s+(\d+)/ && '$enforce') {
$maximum = '$blkhard';
$minimum = '$blkhard' * 85/100;
if (($2 < $minimum || $2 > $maximum) && '$noextsz') {
printf(" URK - %d is out of range! [%d,%d] \n",
$2, $minimum, $maximum);
if (/^\#'$id'\s+(\d+)/ && '$enforce') {
$maximum = '$bhard';
$minimum = '$bhard' * 85/100;
if (($1 < $minimum || $1 > $maximum) && '$noextsz') {
printf(" URK %d: %d is out of range! [%d,%d]\n",
'$id', $1, $minimum, $maximum);
}
s/^('$name'\s+[-|+][-|+]\s+)(\d+)/\1 OK/g;
s/^(\#'$id'\s+)(\d+)/\1 =OK=/g;
}
' | _filter_repquota
' | _filter_report
}
_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
@@ -82,13 +87,6 @@ cat $tmp.mkfs >>$seq.full
_qmount
# Irix uses filesystem name and Linux uses device of filesystem
if [ $HOSTOS = "Linux" ]; then
QUOTA_FS=$SCRATCH_DEV
else
QUOTA_FS=$SCRATCH_MNT
fi
# Figure out whether we're doing large allocations
# (bail out if they're so large they stuff the test up)
_test_inode_flag extsz-inherit $SCRATCH_MNT
@@ -104,28 +102,31 @@ echo "and using type=$type id=$id" >>$seq.full
echo
echo "*** report no quota settings" | tee -a $seq.full
_repquota -$type $QUOTA_FS | _filter_repquota
xfs_quota -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report
echo
echo "*** report initial settings" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/initme $id $type 1024 0
echo "ls -l $SCRATCH_MNT" >>$seq.full
ls -l $SCRATCH_MNT >>$seq.full
_setquota -$type $id $blksoft $blkhard $inosoft $inohard $QUOTA_FS
_repquota -$type $QUOTA_FS | _filter_repquota
xfs_quota -x \
-c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \
-c "limit -$type isoft=$isoft ihard=$ihard $id" \
$SCRATCH_DEV
xfs_quota -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report
echo
echo "*** push past the soft inode limit" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie1 $id $type 1024 0
_file_as_id $SCRATCH_MNT/softie2 $id $type 1024 0
_qmount
_repquota -$type $QUOTA_FS | _filter_repquota
xfs_quota -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report
echo
echo "*** push past the soft block limit" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie $id $type 1024 140
_qmount
_repquota -$type $QUOTA_FS | _filter_repquota
xfs_quota -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report
echo
# Note: for quota accounting (not enforcement), EDQUOT is not expected
@@ -135,7 +136,7 @@ do
_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
done
_qmount
_repquota -$type $QUOTA_FS | _filter_repquota
xfs_quota -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report
echo
# Note: for quota accounting (not enforcement), EDQUOT is not expected
@@ -144,7 +145,7 @@ _file_as_id $SCRATCH_MNT/softie $id $type 1024 540
echo "ls -l $SCRATCH_MNT" >>$seq.full
ls -l $SCRATCH_MNT >>$seq.full
_qmount
_repquota -$type $QUOTA_FS | _filter_and_check_blocks
xfs_quota -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_and_check_blks
# success, all done
status=0
+11 -23
View File
@@ -7,38 +7,26 @@ log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** report no quota settings
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
*** report initial settings
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 1 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft inode limit
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 3 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft block limit
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* 140 100 500 4 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the hard inode limit (expect EDQUOT)
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 4 0 0 3 0 0
name +* 140 100 500 16 4 10
[ROOT] 4 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------]
*** push past the hard block limit (expect EDQUOT)
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 4 0 0 3 0 0
name +* 540 100 500 16 4 10
[ROOT] 4 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------]
*** unmount
+11 -23
View File
@@ -7,38 +7,26 @@ log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** report no quota settings
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
*** report initial settings
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 1 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft inode limit
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 3 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft block limit
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* 140 100 500 7days 4 4 10 7days
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [7 days] 4 4 10 00 [7 days] 0 0 0 00 [--------]
*** push past the hard inode limit (expect EDQUOT)
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* 140 100 500 7days 10 4 10 7days
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]
*** push past the hard block limit (expect EDQUOT)
Block limits File limits
Group used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* OK 100 500 7days 10 4 10 7days
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] =OK= 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]
*** unmount
+32
View File
@@ -0,0 +1,32 @@
QA output created by 050
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
= sunit=XXX swidth=XXX, unwritten=X
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** report no quota settings
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
*** report initial settings
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft inode limit
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft block limit
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the hard inode limit (expect EDQUOT)
[ROOT] 4 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------]
*** push past the hard block limit (expect EDQUOT)
[ROOT] 4 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------]
*** unmount
+32
View File
@@ -0,0 +1,32 @@
QA output created by 050
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
= sunit=XXX swidth=XXX, unwritten=X
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** report no quota settings
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
*** report initial settings
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft inode limit
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft block limit
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [7 days] 4 4 10 00 [7 days] 0 0 0 00 [--------]
*** push past the hard inode limit (expect EDQUOT)
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]
*** push past the hard block limit (expect EDQUOT)
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] =OK= 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]
*** unmount
+11 -23
View File
@@ -7,38 +7,26 @@ log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** report no quota settings
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
*** report initial settings
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 1 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft inode limit
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 3 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft block limit
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* 140 100 500 4 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the hard inode limit (expect EDQUOT)
Block limits File limits
User used soft hard grace used soft hard grace
name -* 4 0 0 3 0 0
name +* 140 100 500 16 4 10
[ROOT] 4 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------]
*** push past the hard block limit (expect EDQUOT)
Block limits File limits
User used soft hard grace used soft hard grace
name -* 4 0 0 3 0 0
name +* 540 100 500 16 4 10
[ROOT] 4 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------]
*** unmount
+11 -23
View File
@@ -7,38 +7,26 @@ log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** report no quota settings
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
*** report initial settings
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 1 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft inode limit
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name -* 0 100 500 3 4 10
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------]
*** push past the soft block limit
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* 140 100 500 7days 4 4 10 7days
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [7 days] 4 4 10 00 [7 days] 0 0 0 00 [--------]
*** push past the hard inode limit (expect EDQUOT)
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* 140 100 500 7days 10 4 10 7days
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]
*** push past the hard block limit (expect EDQUOT)
Block limits File limits
User used soft hard grace used soft hard grace
name -* 0 0 0 3 0 0
name +* OK 100 500 7days 10 4 10 7days
[ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
[NAME] =OK= 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]
*** unmount
+13 -23
View File
@@ -62,6 +62,8 @@ if src/feature -U $SCRATCH_DEV ; then
type=u; eval `_choose_uid`
elif src/feature -G $SCRATCH_DEV ; then
type=g; eval `_choose_gid`
elif src/feature -P $SCRATCH_DEV ; then
type=p; eval `_choose_prid`
else
_notrun "No quota support at mount time"
fi
@@ -70,37 +72,25 @@ fi
_file_as_id $SCRATCH_MNT/foo $id $type $dbsize 220
sync
# Irix uses filesystem name and Linux uses device of filesystem
if [ $HOSTOS = "Linux" ]; then
QUOTA_FS=$SCRATCH_DEV
else
QUOTA_FS=$SCRATCH_MNT
fi
# set limit at 1001 (1k) blocks
bsoft=1001
bhard=1001
isoft=10
ihard=10
_setquota -$type $id $bsoft $bhard $isoft $ihard $QUOTA_FS
xfs_quota -x \
-c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \
-c "limit -$type isoft=$isoft ihard=$ihard $id" \
$SCRATCH_DEV
_filter_quota()
{
perl -ne '
if (m[^\s*'$QUOTA_FS'\s+(\d+)\s+(\d+)\s+(\d+)] ||
($next == 1 && m,^\s+(\d+)\s+(\d+)\s+(\d+),)) {
# cross check blks, softblks, hardblks <-> quota, xfs_db
xfs_quota -c "quota -$type -birnN $id" $SCRATCH_DEV |
tr -s '[:space:]' | tee -a $seq.full | perl -ne '
if (m[^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+)]) {
print "used_blocks=", $1, "\n";
print "soft_blocks=", $2, "\n";
print "hard_blocks=", $3, "\n";
$next = 0;
}
elsif (m[^\s*'$QUOTA_FS']) { # devfs (long) names
$next = 1;
}' | LC_COLLATE=POSIX sort
}
# cross check blks, softblks, hardblks <-> quota, xfs_db
_quota -$type $id | tee -a $seq.full | _filter_quota >$tmp.quota
}' | LC_COLLATE=POSIX sort >$tmp.quota
echo ===quota output >> $seq.full
cat $tmp.quota >> $seq.full
@@ -124,8 +114,8 @@ echo ===xfs_db output >> $seq.full
cat $tmp.xfs_db >> $seq.full
[ ! -s $tmp.xfs_db ] && echo "warning: xfs_db output file is empty"
echo Comparing out of quota and xfs_db
diff $tmp.quota $tmp.xfs_db
echo Comparing out of xfs_quota and xfs_db
diff $tmp.quota $tmp.xfs_db
[ $? -eq 0 ] && echo OK.
# success, all done
+1 -1
View File
@@ -5,5 +5,5 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
Comparing out of quota and xfs_db
Comparing out of xfs_quota and xfs_db
OK.
+15 -97
View File
@@ -1,14 +1,15 @@
##/bin/sh
#
# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
# Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
# All Rights Reserved.
#
# Functions useful for quota tests
#
#
#
# checks that the XFS quota support in the kernel is enabled
# and that we have valid quota user tools installed.
#
#
_require_quota()
{
src/feature -q $TEST_DEV
@@ -18,11 +19,11 @@ _require_quota()
#
# checks that the XFS project quota support in the kernel is enabled.
#
#
_require_prjquota()
{
src/feature -p $TEST_DEV
[ $? -ne 0 ] && _notrun "Installed kernel does not support XFS project quotas"
[ $? -ne 0 ] && _notrun "Installed kernel does not support project quotas"
}
#
@@ -39,16 +40,20 @@ _require_nobody()
# create a file as a specific user (uid)
# takes filename, id, type (u/g), blocksize, blockcount
#
#
_file_as_id()
{
[ $# != 5 ] && _notrun "broken call to _file_as_id in test $seq"
if [ $3 = u ]
then
if [ $3 = p ]; then
size=`expr $4 \* $5`;
echo xfs_io -f -c "chproj $2" -c "pwrite -b $4 0 $size" $1 >>$seq.full
$XFS_IO_PROG -f -c "chproj $2" -c "pwrite -b $4 0 $size" $1 \
>>$seq.full 2>&1
return
elif [ $3 = u ]; then
magik='$>' # perlspeak for effective uid
elif [ $3 = g ]
then
elif [ $3 = g ]; then
magik='$)' # perlspeak for effective gid
else
_notrun "broken type in call to _file_as_id in test $seq"
@@ -89,34 +94,6 @@ _choose_prid()
/etc/projid
}
#
# filter to get the guts out
# and make linux and irix similar
#
_filter_repquota()
{
tee -a $seq.full | $AWK_PROG '
/File limits/ {
gotit = 1
}
gotit==1 {
sub(/Disk/, "Block")
gsub(/timeleft/, "grace")
gsub(/[.]0 /,"")
sub(/- /, "* ")
sub(/[+] /, "* ")
gsub(/1week/,"7days")
gsub(/NOT STARTED/,"")
gsub(/[ \t]+/, " ")
if ($0 ~ / [-+]/)
$1 = "name"
if ($0 !~ /^$/)
print
next
}
' | sed -e '/-----------------/d'
}
_qmount()
{
umount $SCRATCH_DEV >/dev/null 2>&1
@@ -157,64 +134,5 @@ _qsetup()
echo "and using type=$type id=$id" >>$seq.full
}
#-----------------------------------------------------------------------------------
#
# wrappers for Linux/IRIX differences
#
_setquota()
{
_opt_type=$1
_id=$2
_bsoft=$3
_bhard=$4
_isoft=$5
_ihard=$6
_fs=$7
[ $# -eq 7 ] || _fail "_setquota failed with wrong # args: $*"
if [ $HOSTOS = "Linux" ]; then
echo "setquota $_opt_type $_id $_bsoft $_bhard $_isoft $_ihard $_fs" >>$seq.full
setquota $_opt_type $_id $_bsoft $_bhard $_isoft $_ihard $_fs
else
# IRIX
if [ $_opt_type = "-u" ]; then
_opt_type=""
id_param="uid"
else
id_param="gid"
fi
echo "/usr/etc/edquota $_opt_type -f $_fs -l $id_param=$_id,bsoft=$_bsoft,bhard=$_bhard,isoft=$_isoft,ihard=$_ihard" >>$seq.full
/usr/etc/edquota $_opt_type -f $_fs -l $id_param=$_id,bsoft=$_bsoft,bhard=$_bhard,isoft=$_isoft,ihard=$_ihard
fi
}
_quota()
{
echo "quota $*" >>$seq.full
if [ $HOSTOS = "Linux" ]; then
quota $*
else
# clear -u
args=`echo $*|sed -e 's/-u//'`
quota -v $args
fi
}
_repquota()
{
echo "repquota $*" >>$seq.full
if [ $HOSTOS = "Linux" ]; then
repquota $*
else
# clear -u
args=`echo $*|sed -e 's/-u//'`
repquota -v $args
fi
}
#-----------------------------------------------------------------------------------
# make sure this script returns success
/bin/true