abstract out multiple quota .seq files into a shared common routine.

This commit is contained in:
Nathan Scott
2001-05-22 06:07:23 +00:00
parent 477a2a2018
commit 54392f47c4
4 changed files with 35 additions and 16 deletions
+29 -1
View File
@@ -419,9 +419,37 @@ _xfs_mounted()
fi
}
# setup the .out file link, depending on which form of quota is
# enabled as this often influences how the test output appears.
# [NB: SCRATCH_DEV must be mounted for this to work]
#
_setup_seq_out()
{
# this lets us phase use of this into the dump/restore tests easier...
[ -f $seq.ugquota -a -f $seq.noquota -a $seq.usrquota -a $seq.grpquota ] \
|| return
rm -f $seq.out
if src/feature -U $SCRATCH_DEV
then
if src/feature -G $SCRATCH_DEV
then
ln $seq.ugquota $seq.out
else
ln $seq.usrquota $seq.out
fi
elif src/feature -G $SCRATCH_DEV
then
ln $seq.grpquota $seq.out
else
ln $seq.noquota $seq.out
fi
}
# remount a FS to a new mode (ro or rw)
#
_remount()
{
if [ $# -ne 2 ]