config: allow chacl to be in any directory in $PATH
authorTheodore Ts'o <tytso@mit.edu>
Wed, 13 Aug 2014 01:20:52 +0000 (11:20 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 13 Aug 2014 01:20:52 +0000 (11:20 +1000)
Previously, xfstests checked for chacl in only a few hard-coded
directory: /bin, /sbin, and /usr/bin.  Use set_prog_path to allow
chacl to be in any directory in $PATH, which is how we find the
executable path for most other executables.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/attr
common/config

index 42a1a16962c43e60a10d100071ce3d3fd3be907f..f33166e58862f9d6dd5e59952fbd6e2b784be0e5 100644 (file)
@@ -165,9 +165,7 @@ _filter_aces_notypes()
 
 _require_acls()
 {
 
 _require_acls()
 {
-    if [ ! -x /bin/chacl -a ! -x /usr/bin/chacl -a ! -x /sbin/chacl ]; then
-       _notrun "chacl command not found"
-    fi
+    [ -n $CHACL_PROG ] || _notrun "chacl command not found"
 
     #
     # Test if chacl is able to list ACLs on the target filesystems.  On really
 
     #
     # Test if chacl is able to list ACLs on the target filesystems.  On really
index 0dbf0b9c5ecba7b3b108210d73cd3d86ffd2c442..10cc6fe42196ccc3c79b9367212102ba458a78e7 100644 (file)
@@ -168,6 +168,7 @@ export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
 export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
 export GETFATTR_PROG="`set_prog_path getfattr`"
 export SETFATTR_PROG="`set_prog_path setfattr`"
 export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
 export GETFATTR_PROG="`set_prog_path getfattr`"
 export SETFATTR_PROG="`set_prog_path setfattr`"
+export CHACL_PROG="`set_prog_path chacl`"
 export ATTR_PROG="`set_prog_path attr`"
 export QUOTA_PROG="`set_prog_path quota`"
 export XFS_QUOTA_PROG="`set_prog_path xfs_quota`"
 export ATTR_PROG="`set_prog_path attr`"
 export QUOTA_PROG="`set_prog_path quota`"
 export XFS_QUOTA_PROG="`set_prog_path xfs_quota`"