diff options
Diffstat (limited to 'bin/rancid-run.in')
-rw-r--r-- | bin/rancid-run.in | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/bin/rancid-run.in b/bin/rancid-run.in index 5de4edc..42e387a 100644 --- a/bin/rancid-run.in +++ b/bin/rancid-run.in @@ -1,7 +1,8 @@ #! /bin/sh ## -## $Id: rancid-run.in,v 1.33 2006/05/28 16:38:52 heas Exp $ +## $Id: rancid-run.in,v 1.35 2006/10/05 04:27:43 heas Exp $ ## +## @PACKAGE@ @VERSION@ ## Copyright (C) 1997-2006 by Terrapin Communications, Inc. ## All rights reserved. ## @@ -33,29 +34,30 @@ CR_ARGV=""; export CR_ARGV # print a usage message to stderr pr_usage() { - echo "usage: $0 [-f config_file] [-r device_name] [-m mail rcpt] [group [group ...]]" >&2; + echo "usage: $0 [-V] [-f config_file] [-r device_name] [-m mail rcpt] [group [group ...]]" >&2; } # command-line options +# -V +# -f <config file name> +# -m <mailto address> # -r <device name> if [ $# -ge 1 ] ; then while [ 1 ] ; do case $1 in - -f) - shift - # next arg is the device name - ENVFILE="$1" - if [ -z $ENVFILE ]; then - pr_usage - exit 1 - fi - shift - ;; - -r) + -V) + echo "@PACKAGE@ @VERSION@" + exit 0 + ;; + -f) shift - # next arg is the device name - CR_ARGV="$CR_ARGV -r $1"; export CR_ARGV + # next arg is the alternate config file name + ENVFILE="$1" + if [ -z $ENVFILE ]; then + pr_usage + exit 1 + fi shift ;; -m) @@ -64,6 +66,12 @@ if [ $# -ge 1 ] ; then CR_ARGV="$CR_ARGV -m $1"; export CR_ARGV shift ;; + -r) + shift + # next arg is the device name + CR_ARGV="$CR_ARGV -r $1"; export CR_ARGV + shift + ;; --) shift; break; ;; |