#! /bin/sh #---------------------------------------------------------------------------- # delete-all-routes - delete all existing routes on an interface # # called by imond # # Creation: 14.11.2000 fm # Last Update: $Id$ #---------------------------------------------------------------------------- device=$1 if [ "$device" = "pppoe" ] then device=`cat /var/run/pppoe-device` device='ppp0' fi ip link set $device down if [ -f /var/run/$device.conf ] then conf=`cat /var/run/$device.conf` set $conf ip addr flush dev $device ip addr add $1 peer $2 dev $device ip link set $device up else ip link set $device up fi exit 0