ip/routef lifesaver

keep people from screwing their systems with routef

minor patch here ... if you run `routef --help`,
it'll turn around and flush your routing tables anyways :)

so patch will have routef output usage if any arguments are given, 
otherwise it'll flush the tables ... idea is from Lars Strojny
This commit is contained in:
Mike Frysinger 2006-07-15 03:31:48 -04:00 committed by Stephen Hemminger
parent e7113c61cb
commit 1e253d72f4
1 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
#! /bin/sh
if [ -z "$*" ] ; then
exec ip -4 ro flush scope global type unicast
else
echo "Usage: routef"
echo
echo "This script will flush the IPv4 routing table"
fi