Made releng/auto_isocontent work on filesystems with no xattr and ACL

This commit is contained in:
Thomas Schmitt 2011-08-23 12:09:53 +00:00
parent a82cc372f9
commit 3cea143cd1
1 changed files with 5 additions and 3 deletions

View File

@ -110,12 +110,13 @@ echo echo hello world >"$acl_xattr_test_file" || exit 1
sys=$(uname -s)
acls=no
default_acls=no
if ( setfacl -m u::rwx,g::r-x,o::---,u:root:rwx,g::r-x,g:sys:rwx,u:daemon:r--,mask::rwx \
setfacl_opts=""
if ( setfacl -m u::rwx,g::r-x,o::---,u:root:rwx,g:sys:rwx,u:daemon:r--,mask::rwx \
"$acl_xattr_test_file" ) >/dev/null 2>&1
then
if ( getfacl "$acl_xattr_test_file" ) >/dev/null 2>&1
then
if ( setfacl -m u::rwx,g::r-x,o::---,u:root:rwx,g::r-x,g:sys:rwx,u:daemon:r--,mask::rwx \
if ( setfacl -m u::rwx,g::r-x,o::---,u:root:rwx,g:sys:rwx,u:daemon:r--,mask::rwx \
"$acl_xattr_test_dir" ) >/dev/null 2>&1
then
acls=yes
@ -126,6 +127,7 @@ then
then
default_acls=yes
fi
setfacl_opts="-setfacl u::rwx,g::r-x,o::---,u:root:rwx,g:sys:rwx,u:daemon:r--,mask::rwx,d:u::rwx,d:g::r-x,d:o::---,d:u:root:rwx,d:g:sys:rwx,d:u:daemon:r--,d:mask::rwx --"
fi
fi
fi
@ -213,7 +215,7 @@ echo -e "\n${SELF}: Producing simple image with for_backup/update_r/hardlinks" >
-outdev "$image_file" \
-volid TEST_AUTO_ISOCONTENT \
-update_r "$on_disk" "$in_iso" \
-setfacl u::rwx,g::r-x,o::---,u:root:rwx,g:sys:rwx,u:daemon:r--,mask::rwx,d:u::rwx,d:g::r-x,d:o::---,d:u:root:rwx,d:g:sys:rwx,d:u:daemon:r--,d:mask::rwx "$acl_xattr_iso_dir" -- \
$setfacl_opts \
-hardlinks perform_update
ret=$?