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
|
#!/bin/sh
set -e
if [ "$1" = configure ]; then
if command -v setcap > /dev/null; then
if setcap cap_net_raw+ep /usr/bin/clockdiff; then
chmod u-s /usr/bin/clockdiff
else
echo "Setcap failed on /usr/bin/clockdiff, falling back to setuid" >&2
chmod u+s /usr/bin/clockdiff
fi
else
echo "Setcap is not installed, falling back to setuid" >&2
chmod u+s /usr/bin/clockdiff
fi
fi
#DEBHELPER#
exit 0
# Local variables:
# mode: shell-script
# tab-width: 4
# indent-tabs-mode: nil
# end:
|