svn commit: r317641 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Mon May 1 08:01:56 UTC 2017
Author: pho
Date: Mon May 1 08:01:54 2017
New Revision: 317641
URL: https://svnweb.freebsd.org/changeset/base/317641
Log:
Test for ufs_extattr and if setfacl(1) exist.
Sponsored by: Dell EMC Isilon
Modified:
user/pho/stress2/misc/extattr.sh
user/pho/stress2/misc/extattr_set_fd.sh
user/pho/stress2/misc/extattrctl.sh
Modified: user/pho/stress2/misc/extattr.sh
==============================================================================
--- user/pho/stress2/misc/extattr.sh Mon May 1 07:52:22 2017 (r317640)
+++ user/pho/stress2/misc/extattr.sh Mon May 1 08:01:54 2017 (r317641)
@@ -34,6 +34,8 @@
[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
. ../default.cfg
+[ "`sysctl -in kern.features.ufs_extattr`" != "1" ] && exit 0
+[ -z "`which setfacl`" ] && exit 0
odir=`pwd`
Modified: user/pho/stress2/misc/extattr_set_fd.sh
==============================================================================
--- user/pho/stress2/misc/extattr_set_fd.sh Mon May 1 07:52:22 2017 (r317640)
+++ user/pho/stress2/misc/extattr_set_fd.sh Mon May 1 08:01:54 2017 (r317641)
@@ -34,6 +34,8 @@
[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
. ../default.cfg
+[ "`sysctl -in kern.features.ufs_extattr`" != "1" ] && exit 0
+[ -z "`which setfacl`" ] && exit 0
here=`pwd`
cd /tmp
Modified: user/pho/stress2/misc/extattrctl.sh
==============================================================================
--- user/pho/stress2/misc/extattrctl.sh Mon May 1 07:52:22 2017 (r317640)
+++ user/pho/stress2/misc/extattrctl.sh Mon May 1 08:01:54 2017 (r317641)
@@ -42,27 +42,28 @@
. ../default.cfg
-sysctl -a | ! grep -q ufs_extattr && echo "Missing options UFS_EXTATTR" && exit 1
+[ "`sysctl -in kern.features.ufs_extattr`" != "1" ] && exit 0
+[ -z "`which setfacl`" ] && exit 0
-mount | grep "${mntpoint}" | grep -q md${mdstart}${part} && umount $mntpoint
+mount | grep "$mntpoint" | grep -q md${mdstart}$part && umount $mntpoint
mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart
mdconfig -a -t swap -s 20m -u $mdstart
bsdlabel -w md$mdstart auto
-newfs -O 1 md${mdstart}${part} > /dev/null
-mount /dev/md${mdstart}${part} $mntpoint
+newfs -O 1 md${mdstart}$part > /dev/null
+mount /dev/md${mdstart}$part $mntpoint
-mkdir -p ${mntpoint}/.attribute/system
-cd ${mntpoint}/.attribute/system
+mkdir -p $mntpoint/.attribute/system
+cd $mntpoint/.attribute/system
extattrctl initattr -p . 388 posix1e.acl_access
extattrctl initattr -p . 388 posix1e.acl_default
cd /
umount /mnt
-tunefs -a enable /dev/md${mdstart}${part}
-mount /dev/md${mdstart}${part} $mntpoint
-mount | grep md${mdstart}${part}
+tunefs -a enable /dev/md${mdstart}$part
+mount /dev/md${mdstart}$part $mntpoint
+mount | grep md${mdstart}$part
touch $mntpoint/acl-test
setfacl -b $mntpoint/acl-test
More information about the svn-src-user
mailing list