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 32
|
#!/bin/sh
set -e
# Setup alternatives
update-alternatives --install /lib/systemd/system/ipset.service ipset.service /lib/systemd/system/netfilter-persistent.service 40
# Source debconf library
. /usr/share/debconf/confmodule
case "$1" in
configure)
db_get ipset-persistent/autosave_done || true
if [ "x$RET" != "xtrue" ]; then
db_get ipset-persistent/autosave || true
if [ "x$RET" = "xtrue" ]; then
if which ipset > /dev/null ; then
if ipset list > /dev/null; then
ipset save > /etc/iptables/ipsets
else
echo "IPset: Unable to save sets (module not loadable or other problem)"
fi
fi
fi
db_set ipset-persistent/autosave_done true || true
fi
;;
esac
#DEBHELPER#
|