aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2023-01-29 19:02:02 -0800
committerGerald Combs <gerald@wireshark.org>2023-03-03 14:07:51 -0800
commitccf01edf0436788f81f2ce5f400b5a6d940e901a (patch)
tree55d1b348a616d95a62697d45a9009b6bed2f5b83
parent5bbaf9ef354ed1bae50060800a1775f315b666f1 (diff)
macOS: Update the ChmodBPF postinstall script
`launchctl load` and `launchctl unload` are deprecated. Use `launchctl bootstrap system` and `launchctl bootout system` instead.
-rwxr-xr-xpackaging/macosx/ChmodBPF/install-scripts/postinstall3
-rwxr-xr-xpackaging/macosx/ChmodBPF/uninstall-scripts/postinstall2
2 files changed, 3 insertions, 2 deletions
diff --git a/packaging/macosx/ChmodBPF/install-scripts/postinstall b/packaging/macosx/ChmodBPF/install-scripts/postinstall
index 120619ab39..1f11eb3e8c 100755
--- a/packaging/macosx/ChmodBPF/install-scripts/postinstall
+++ b/packaging/macosx/ChmodBPF/install-scripts/postinstall
@@ -29,6 +29,7 @@ dseditgroup -q -o edit -a "$USER" -t user "$BPF_GROUP"
chmod u=rw,g=r,o=r "$CHMOD_BPF_PLIST"
chown root:wheel "$CHMOD_BPF_PLIST"
+# Clean up our legacy startup item if it's still around.
rm -rf /Library/StartupItems/ChmodBPF
-launchctl load "$CHMOD_BPF_PLIST"
+launchctl bootstrap system "$CHMOD_BPF_PLIST"
diff --git a/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall b/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall
index dc12879230..93a33b4c50 100755
--- a/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall
+++ b/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall
@@ -10,7 +10,7 @@
CHMOD_BPF_PLIST="/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist"
BPF_GROUP="access_bpf"
-launchctl unload -F "$CHMOD_BPF_PLIST"
+launchctl bootout system "$CHMOD_BPF_PLIST"
dscl . -read /Groups/"$BPF_GROUP" > /dev/null 2>&1 && \
dseditgroup -q -o delete "$BPF_GROUP"