postinst is in iputils-ping 3:20121221-4ubuntu1.
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 | #!/bin/sh
set -e
PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH
for f in /bin/ping /bin/ping6; do
# if the admin has set an override, don't do anything at all
if ! dpkg-statoverride --list $f > /dev/null 2>&1; then
if getcap $f > /dev/null 2>&1; then
if echo "cap_net_raw+p" | setcap -q - $f; then
# remove the setuid bit!
chmod -s $f
fi
fi
fi
done
# Local variables:
# mode: shell-script
# tab-width: 4
# indent-tabs-mode: nil
# end:
|