The Samba-Bugzilla – Attachment 1740 Details for
Bug 3443
Script should be created to test Xattr support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
First bash at test script
xattr_test.sh (text/plain), 1.58 KB, created by
Julien Goodwin
on 2006-02-18 07:39:45 UTC
(
hide
)
Description:
First bash at test script
Filename:
MIME Type:
Creator:
Julien Goodwin
Created:
2006-02-18 07:39:45 UTC
Size:
1.58 KB
patch
obsolete
>#!/bin/sh ># Test for xattr support in a directory ># or the root directory of all (rw) mounted filesystems ># Author: Julien Goodwin <jgoodwin@studio442.com.au> 19/2/2006 ># Updated: Julien Goodwin <jgoodwin@studio442.com.au> 19/2/2006 > >set -e >set +x > ># Functions >## The test function >function testdir() { > CHECKDIR=$1 > TESTFILE=xattrtest$$ > echo Checking the xattr support in ${CHECKDIR} > cd ${CHECKDIR} > touch ${TESTFILE} > ${SETFATTR} -n user.text -v "test1" ${TESTFILE} > ${SETFATTR} -n security.text -v "test2" ${TESTFILE} > if `${GETFATTR} -d ${TESTFILE} | grep "user.text" | grep -q "test1"`; then > echo "User test succeeded" > else > echo "User test failed" > fi > if `${GETFATTR} -n security.text -d ${TESTFILE} | grep "security.text" | grep -q "test2"`; then > echo "Security test succeeded" > else > echo "Security test failed" > fi > rm ${TESTFILE} > exit 0 >} > ># Check commands >SETFATTR=`which setfattr` >GETFATTR=`which getfattr` > >if [ "x${SETFATTR}" = "x" ]; then > echo setfattr not found in path, do you need to install the attr package? > exit 1 >fi > >if [ "x${GETFATTR}" = "x" ]; then > echo getfattr not found in path, do you need to install the attr package? > exit 1 >fi > > ># Check how we were called >if [ $# -eq 0 ]; then > echo Checking all mounted filesystems > for TESTDIR in `mount | grep rw | grep -vE '(proc|sysfs|tmpfs|devfs|devpts)' | awk '{ print $3 }'`; do > testdir ${TESTDIR} > done > exit 0 >elif [ $# -eq 1 ]; then > echo Checking $1 > testdir $1 > exit $? >else > echo USAGE: > echo $0: > echo Check all mounted filesystems > echo > echo "$0 <directory>:" > echo Check for xattr support in "<directory>" > exit 1 >fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3443
: 1740