From: Mike Frysinger Date: Sat, 15 Jul 2006 07:31:48 +0000 (-0400) Subject: ip/routef lifesaver X-Git-Tag: v2.6.23-071016~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e253d72f4a43dcd5b68541edf06c52d82145648;p=thirdparty%2Fiproute2.git 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 --- diff --git a/ip/routef b/ip/routef index db43b5dff..d266e2d97 100644 --- a/ip/routef +++ b/ip/routef @@ -1,3 +1,9 @@ #! /bin/sh -exec ip -4 ro flush scope global type unicast +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