#!/bin/sh # $Id: postinst,v 1.7 2003/09/08 18:09:03 agx Exp $ set -e # Source debconf library. . /usr/share/debconf/confmodule PS_DEFAULT="/etc/default/portsentry" if [ "$1" = "configure" -a ! -e $PS_DEFAULT ]; then # copy over the settings from /e/portsentry/startup.conf # when upgrading from versions < 1.0-2 if [ -n "$2" ] && dpkg --compare-versions $2 lt 1.0-2 ; then if [ -e /etc/portsentry/startup.conf ]; then . /etc/portsentry/startup.conf fi # create /e/d/portsentry if it doesn't exist on first time installs elif [ -z "$2" ]; then TCP_MODE=tcp UDP_MODE=udp fi if [ -n "$TCP_MODE" -o -n "$UDP_MODE" ]; then cat >$PS_DEFAULT </dev/null invoke-rc.d portsentry start || exit $? fi fi # End automatically added section