summaryrefslogtreecommitdiff
path: root/packaging/macosx/Scripts
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-06-07 10:44:17 -0700
committerGuy Harris <guy@alum.mit.edu>2014-06-07 17:47:20 +0000
commit39ca18d71b85d0b99c0fd3c5edab48fa217d7d34 (patch)
tree593101454b8d1912e2dae2fb935dffd6b0ce6cbb /packaging/macosx/Scripts
parent09f53d802a5cd65a8c61aa554a3fec930e239577 (diff)
downloadwireshark-39ca18d71b85d0b99c0fd3c5edab48fa217d7d34.tar.gz
Only nuke the startup item once we've installed the launch daemon.
That way, if we crash in the middle, there's still something installed that will try to set the permissions on the BPF devices. Change-Id: Ie0c32f9eaca08bdbb359d07e47f20c664bc66411 Reviewed-on: https://code.wireshark.org/review/2023 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'packaging/macosx/Scripts')
-rwxr-xr-xpackaging/macosx/Scripts/chmodbpf-postinstall.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/packaging/macosx/Scripts/chmodbpf-postinstall.sh b/packaging/macosx/Scripts/chmodbpf-postinstall.sh
index c7f48a4cb2..08631b3fd1 100755
--- a/packaging/macosx/Scripts/chmodbpf-postinstall.sh
+++ b/packaging/macosx/Scripts/chmodbpf-postinstall.sh
@@ -4,8 +4,6 @@ CHMOD_BPF="/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist"
BPF_GROUP="access_bpf"
BPF_GROUP_NAME="BPF device access ACL"
-rm -rf /Library/StartupItems/ChmodBPF
-
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"
@@ -15,4 +13,6 @@ cp "/Library/Application Support/Wireshark/ChmodBPF/org.wireshark.ChmodBPF.plist
chmod 755 "$CHMOD_BPF"
chown root:wheel "$CHMOD_BPF"
+rm -rf /Library/StartupItems/ChmodBPF
+
launchctl load "$CHMOD_BPF"