#! /bin/sh if [ "$1" = "post" ] ; then if [ -f "$MAINPATH/$INTERFACE.target" ] ; then TARGET=`cat "$MAINPATH/$INTERFACE.target"` CMD="" [ "$ACTION" = "open" ] && CMD="add" [ "$ACTION" = "close" ] && CMD="del" if [ "$ACTION" = "update" ] && [ "$CURRENTIP" != "$IP" ] ; then route del -host "$CURRENTIP" "$TARGET" CMD="add" fi if [ "$CMD" ] ; then route "$CMD" -host "$IP" "$TARGET" fi fi fi