summaryrefslogtreecommitdiffstats
path: root/bin/rancid-run.in
diff options
context:
space:
mode:
authorTar Committer <tar@ocjtech.us>2006-12-05 16:52:12 +0000
committerTar Committer <tar@ocjtech.us>2006-12-05 16:52:12 +0000
commit1a7c45398738cdb4eaafdc9e0962272f19d54816 (patch)
tree6863882585a40ef9f65a9bab880a22fdb02c06ab /bin/rancid-run.in
parenta0be206eb419f63eeb436631cc91b3456dff006f (diff)
downloadrancid-1a7c45398738cdb4eaafdc9e0962272f19d54816.zip
rancid-1a7c45398738cdb4eaafdc9e0962272f19d54816.tar.gz
rancid-1a7c45398738cdb4eaafdc9e0962272f19d54816.tar.xz
Imported from rancid-2.3.2a6.tar.gz.rancid-2.3.2a6
Diffstat (limited to 'bin/rancid-run.in')
-rw-r--r--bin/rancid-run.in38
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;
;;