Don't hardcode paths to many binaries.
[xfstests-dev.git] / common.quota
index efb3ef9c6b2553ec3483c2bcda53dcd301ab38cc..868e563927febb5f0f16efd9be74215639922806 100644 (file)
@@ -26,7 +26,7 @@
 #
 _require_quota()
 {
-    [ -x /usr/bin/quota ] || _notrun "Quota user tools not installed"
+    [ -n $QUOTA_PROG ] || _notrun "Quota user tools not installed"
     if [ $FSTYP = "xfs" ]; then
        [ -f /proc/fs/xfs/xqmstat ] || _notrun "Installed kernel does not support XFS quota"
     elif [ $FSTYP != "gfs2" ]; then
@@ -42,7 +42,7 @@ _require_xfs_quota()
 {
     src/feature -q $TEST_DEV
     [ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota"
-    [ -x /usr/sbin/xfs_quota ] || _notrun "XFS quota user tools not installed"
+    [ -n $XFS_QUOTA_PROG ] || _notrun "XFS quota user tools not installed"
 }
 
 #