https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6526
Martin Williams <mrwlists@xxxxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mrwlists@xxxxxxxxx
--- Comment #9 from Martin Williams <mrwlists@xxxxxxxxx> 2012-03-16 18:23:52 PDT ---
(In reply to comment #6)
> OK, so we can't use "dseditgroup read" to check whether a group exists on
> Leopard.
But you might use "dscl . -read /Groups/...." to do the same job. This *does*
return an error code if the group does not exist, unlike "dseditgroup read".
In the post install script, replacing:
dseditgroup -q -o read "$BPF_GROUP" > /dev/null 2>&1 || \
dseditgroup -q -o create "$BPF_GROUP"
with:
dscl . -read /Groups/"$BPF_GROUP" > /dev/null 2>&1 || \
dseditgroup -q -o create "$BPF_GROUP"
works on my Leopard 10.5.8 PPC system.
I took that snippet from:
Apple's Shell Scripting Primer Appendix C
Listing C-11 Script for adding a new group using dscl (addgroup.sh)
https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/ShellScripting.pdf
An additional point - I am not clear whether the installer scripts should be
'postinstall', or 'postupgrade', or even both !
Certainly I needed the script to be a 'postupgrade' script to have it run when
I reinstalled the package. In that circumstance a 'postinstall' script does
not seem to run.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.