#!/bin/sh

set -e

case "$1" in
    (configure)
        # Use setcap on Linux only (setuid setting see debian/rules)
        if [ "`uname -s`" = "Linux" ]; then
            if ! setcap cap_net_raw+ep /usr/bin/fping; then
                echo "WARNING: 'setcap cap_net_raw+ep $f' failed." 1>&2
                echo "You may want to call 'dpkg-statoverride --update --add root root 4755 $f' to make it setuid." 1>&2
            fi
        fi
    ;;
    (abort-upgrade|abort-remove|abort-deconfigure)
        exit 0
    ;;
    (*)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

#DEBHELPER#
