macOS: Update the ChmodBPF postinstall script

`launchctl load` and `launchctl unload` are deprecated. Use `launchctl
bootstrap system` and `launchctl bootout system` instead.
This commit is contained in:
Gerald Combs 2023-01-29 19:02:02 -08:00
parent 5bbaf9ef35
commit ccf01edf04
2 changed files with 3 additions and 2 deletions

View File

@ -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"

View File

@ -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"