aboutsummaryrefslogtreecommitdiff
path: root/lib/30-files
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-21 09:17:49 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-21 09:17:49 -0400
commit8e3d7dfa20b966b928078d8071d10fb186a0d781 (patch)
tree60a2a98dd6ae9148d1cf4b8d2f3ec53b9bab41c1 /lib/30-files
parent18e46bcafc2316c53d167cf6550fb69bd4e3be79 (diff)
downloadinfrastructure-8e3d7dfa20b966b928078d8071d10fb186a0d781.tar.gz
cleanup nfs1 host script
Diffstat (limited to 'lib/30-files')
-rw-r--r--lib/30-files9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/30-files b/lib/30-files
index 767bbeb..4ba6587 100644
--- a/lib/30-files
+++ b/lib/30-files
@@ -179,3 +179,12 @@ install_ca_certificate(){
install -m "$_bcicc_mode" $_bcicc_install_args "${BOXCONF_CA_DIR}/ca.crt" "$1"
log "installed root CA to ${1}"
}
+
+set_facl(){
+ # Replaces the NFSv4 ACL on a file with the specified ACL list.
+ # $1 = path
+ # $2-$N = ACL entries
+ [ "$BOXCONF_OS" = freebsd ] || bug 'set_facl only supported on FreeBSD'
+ _bcsetfacl_path=$1; shift
+ setfacl -b -a 0 "$(join ',' "$@")" "$_bcsetfacl_path"
+}