From 1e253d72f4a43dcd5b68541edf06c52d82145648 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 15 Jul 2006 03:31:48 -0400 Subject: [PATCH] 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 --- ip/routef | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ip/routef b/ip/routef index db43b5df..d266e2d9 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