#!/bin/sh
#----------------------------------------------------------------------------
# /etc/ppp/ip-down600.portfw - remove all forwardings
#
# Creation:     23.07.2001  tg
# Last Update:  $Id: ip-down600.portfw 5836 2004-06-23 14:27:08Z lanspezi $
#----------------------------------------------------------------------------

echo 'shutting down port forwarding...'
rem_pre='/var/run/portfw.rem.'

if [ "$is_default_route" = "yes" -a -f ${rem_pre}default ]
  # is a default-route-interface going down & config-file there?
then
    . ${rem_pre}default
    rm ${rem_pre}default
fi

if [ -f ${rem_pre}$interface ]
  # is there a remove-file for the interface going down?
then
    . ${rem_pre}$interface
    rm ${rem_pre}$interface
fi

echo 'port forwarding: done'
