From b7cfa1359d4b5bd9d4bd962d97b9ca1123f96847 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 20 Mar 2012 04:06:36 +0000 Subject: 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 --- packaging/macosx/Scripts/chmodbpf-postinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- cgit v1.2.1