summaryrefslogtreecommitdiffstats
path: root/packaging/macosx/ChmodBPF/install-scripts/postinstall
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpackaging/macosx/ChmodBPF/install-scripts/postinstall5
1 files changed, 5 insertions, 0 deletions
diff --git a/packaging/macosx/ChmodBPF/install-scripts/postinstall b/packaging/macosx/ChmodBPF/install-scripts/postinstall
index 1f11eb3e..8f5035de 100755
--- a/packaging/macosx/ChmodBPF/install-scripts/postinstall
+++ b/packaging/macosx/ChmodBPF/install-scripts/postinstall
@@ -32,4 +32,9 @@ chown root:wheel "$CHMOD_BPF_PLIST"
# Clean up our legacy startup item if it's still around.
rm -rf /Library/StartupItems/ChmodBPF
+# Try to bootout first, otherwise bootstrap will fail with
+# "Bootstrap failed: 5: Input/output error"
+# if org.wireshark.ChmodBPF is already loaded.
+launchctl bootout system "$CHMOD_BPF_PLIST" > /dev/null 2>&1
+
launchctl bootstrap system "$CHMOD_BPF_PLIST"