aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/macosx/Scripts/chmodbpf-postinstall.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-03-20 04:06:36 +0000
committerGuy Harris <guy@alum.mit.edu>2012-03-20 04:06:36 +0000
commitb7cfa1359d4b5bd9d4bd962d97b9ca1123f96847 (patch)
tree97a9d779fa2dbfd47d92aadd95099f7ef8643b8c /packaging/macosx/Scripts/chmodbpf-postinstall.sh
parentc68988797d08a79032028692453a250fbf0ab40b (diff)
Now, isn't that swell! Leopard's dseditgroup doesn't return a failure
exit status if the group in question doesn't exist, so we can't use dseditgroup on Leopard to check whether the access_bpf group exists. Instead, as per Martin Williams' suggestion in bug 6526, use "dscl . -read /groups/{group}" instead; the suggestion came from the addgroup.sh script in https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/ShellScripting.pdf svn path=/trunk/; revision=41680
Diffstat (limited to 'packaging/macosx/Scripts/chmodbpf-postinstall.sh')
-rwxr-xr-xpackaging/macosx/Scripts/chmodbpf-postinstall.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/packaging/macosx/Scripts/chmodbpf-postinstall.sh b/packaging/macosx/Scripts/chmodbpf-postinstall.sh
index 7d215091ea..d0cd33d8eb 100755
--- a/packaging/macosx/Scripts/chmodbpf-postinstall.sh
+++ b/packaging/macosx/Scripts/chmodbpf-postinstall.sh
@@ -5,7 +5,7 @@ CHMOD_BPF="$CHMOD_BPF_DIR/ChmodBPF"
BPF_GROUP="access_bpf"
BPF_GROUP_NAME="BPF device access ACL"
-dseditgroup -q -o read "$BPF_GROUP" > /dev/null 2>&1 || \
+dscl . -read /Groups/"$BPF_GROUP" > /dev/null 2>&1 || \
dseditgroup -q -o create "$BPF_GROUP"
dseditgroup -q -o edit -a "$USER" -t user "$BPF_GROUP"