postinst is in wireshark-common 1.6.7-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/bin/sh -e
. /usr/share/debconf/confmodule
PROGRAM=/usr/bin/dumpcap
GROUP=wireshark
if ! dpkg-statoverride --list $PROGRAM > /dev/null; then
db_get wireshark-common/install-setuid
if [ -e "$PROGRAM" ]; then
if [ "$RET" = "false" ] ; then
chown root:root $PROGRAM
chmod u=rwx,go=rx $PROGRAM
else
addgroup --quiet --system $GROUP
chown root:$GROUP $PROGRAM
if which setcap > /dev/null ; then
chmod u=rwx,g=rx,o=r $PROGRAM
if ! setcap cap_net_raw,cap_net_admin=eip $PROGRAM; then
echo "Setting capabilities for dumpcap using Linux Capabilities failed."
echo "Falling back to setting set-user-id bit."
chmod u=rwxs,g=rx,o=r $PROGRAM
fi
else
chmod u=rwxs,g=rx,o=r $PROGRAM
fi
fi
fi
else
echo "Preserving owner and mode for $PROGRAM set by dpkg-statoverride:"
dpkg-statoverride --list $PROGRAM
fi
|