diff options
author | Tar Committer <tar@ocjtech.us> | 2006-05-04 21:40:56 +0000 |
---|---|---|
committer | Tar Committer <tar@ocjtech.us> | 2006-05-04 21:40:56 +0000 |
commit | 1cc9f22072de1d314a67387aac57740fb25c5258 (patch) | |
tree | f59aa9d622175580add0923bfac8963dc946e98e /bin/tntrancid.in | |
parent | c0482931956d127b5f09d4a8d72758cd4cb1f097 (diff) | |
download | rancid-1cc9f22072de1d314a67387aac57740fb25c5258.tar.gz rancid-1cc9f22072de1d314a67387aac57740fb25c5258.tar.xz rancid-1cc9f22072de1d314a67387aac57740fb25c5258.zip |
Imported from rancid-2.3.2a4.tar.gz.rancid-2.3.2a4
Diffstat (limited to 'bin/tntrancid.in')
-rw-r--r-- | bin/tntrancid.in | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/tntrancid.in b/bin/tntrancid.in index ac3bbee..94a3120 100644 --- a/bin/tntrancid.in +++ b/bin/tntrancid.in @@ -1,6 +1,6 @@ #! @PERLV_PATH@ ## -## $Id: tntrancid.in,v 1.14 2005/06/15 20:54:41 heas Exp $ +## $Id: tntrancid.in,v 1.15 2005/09/25 17:48:31 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -24,7 +24,7 @@ # # RANCID - Really Awesome New Cisco confIg Differ # -# usage: tntrancid [-d] [-l] [-f filename | $host] +# usage: tntrancid [-d] [-l] [-f filename | hostname] # use Getopt::Std; getopts('dfl'); @@ -195,6 +195,15 @@ sub DoNothing {print STDOUT;} $tnt_cmds=join(";",@commands); $cmds_regexp=join("|",@commands); +if (length($host) == 0) { + if ($file) { + print(STDERR "Too few arguments: file name required\n"); + exit(1); + } else { + print(STDERR "Too few arguments: host name required\n"); + exit(1); + } +} open(OUTPUT,">$host.new") || die "Can't open $host.new for writing: $!\n"; select(OUTPUT); # make OUTPUT unbuffered if debugging |