Commits

Davide Gerhard authored and Chris Jones committed 4e4ff37b8b1
wireshark-chmodbpf: fix group creation if installed from binary

fix group creation if installed from the binary package Closes: https://trac.macports.org/ticket/58537
No tags

net/wireshark-chmodbpf/Portfile

Modified
1 1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2 2
3 3 PortSystem 1.0
4 4
5 5 name wireshark-chmodbpf
6 6 version 1.0
7 -revision 1
7 +revision 2
8 8 platforms darwin macosx
9 9 categories net
10 10 license {GPL-2 GPL-3}
11 11 maintainers {@ra1nb0w irh.it:rainbow} {darkart.com:opendarwin.org @ghosthound} openmaintainer
12 12 description Enable Wireshark to acces macOS capture devices.
13 13 long_description An access_bpf group will be created and its members \
14 14 allowed access to BPF devices at boot to allow unprivileged packet \
15 15 captures. It is meant to support Wireshark where unprivileged access \
16 16 to macOS packet capture devices is desired.
17 17 homepage https://www.wireshark.org
30 30 pre-destroot {
31 31 # create the group to access capture devices
32 32 addgroup ${bpf_group}
33 33 }
34 34
35 35 destroot {
36 36 reinplace s|@BPF_GROUP@|${bpf_group}|g ${worksrcpath}/sbin/${name}
37 37 xinstall -m 0755 -o root -g wheel ${worksrcpath}/sbin/${name} ${destroot}${prefix}/sbin/${name}
38 38 }
39 39
40 +# fix group creation if installed from the binary package
41 +post-install {
42 + # create the group to access capture devices
43 + addgroup ${bpf_group}
44 +}
45 +
40 46 # create startup that run ${name} script
41 47 startupitem.create yes
42 48 startupitem.name wireshark.ChmodBPF
43 49 startupitem.autostart yes
44 50 startupitem.executable ${prefix}/sbin/${name}
45 51 startupitem.pidfile none
46 52
47 53 notes "
48 54 To fully complete your installation and use Wireshark
49 55 to capture from devices (like network interfaces) please run:

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut