#!/bin/sh MWST="down" source /etc/iptables/ifnames if test -f /etc/iptables/state/mwstate then source /etc/iptables/state/mwstate fi if [ $MWST = "up" ] then logger -t mwcheck "Bringing mw routes down, can not route to internet" ip route del default ip route add default via `cat /etc/iptables/state/ppp_peer` fi echo 'MWST="down"' > /etc/iptables/state/mwstate