diff options
author | Tar Committer <tar@ocjtech.us> | 2002-01-04 21:31:49 +0000 |
---|---|---|
committer | Tar Committer <tar@ocjtech.us> | 2002-01-04 21:31:49 +0000 |
commit | 9f2402b0d86333f5f7e9d50437036cd3124bde47 (patch) | |
tree | 163861dc0a0052447f838d3674a35870a80026f5 /bin/do-diffs.in | |
parent | b0d71377c1854271b4511488422427f73d9473d1 (diff) | |
download | rancid-9f2402b0d86333f5f7e9d50437036cd3124bde47.tar.gz rancid-9f2402b0d86333f5f7e9d50437036cd3124bde47.tar.xz rancid-9f2402b0d86333f5f7e9d50437036cd3124bde47.zip |
Imported from rancid-2.2.tar.gz.rancid-2.2
Diffstat (limited to 'bin/do-diffs.in')
-rwxr-xr-x | bin/do-diffs.in | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/bin/do-diffs.in b/bin/do-diffs.in index 940203f..a8d4800 100755 --- a/bin/do-diffs.in +++ b/bin/do-diffs.in @@ -21,6 +21,32 @@ ENVFILE="`dirname $0`/env" TMPDIR=${TMPDIR:=/tmp}; export TMPDIR +# command-line options +# -r <device name> +if [ $# -ge 1 ] ; then + + while [ 1 ] ; do + case $1 in + -r) + shift + # next arg is the device name + device="$1" + shift + ;; + --) + shift; break; + ;; + -*) + echo "unknown option: $1" >&2 + exit 1 + ;; + *) + break; + ;; + esac + done +fi + if [ $# -ge 1 ] ; then LIST_OF_GROUPS="$*"; export LIST_OF_GROUPS elif [ "$LIST_OF_GROUPS" = "" ] ; then @@ -32,7 +58,6 @@ if [ ! -d $BASEDIR/logs ] ; then mkdir $BASEDIR/logs fi - for GROUP in $LIST_OF_GROUPS do @@ -72,7 +97,11 @@ END trap 'rm -fr $LOCKFILE;exit 1' 1 2 3 6 10 15 touch $LOCKFILE if [ $? -eq 0 ] ; then - control_rancid $GROUP + if [ "X$device" = "X" ] ; then + control_rancid $GROUP + else + control_rancid -r $device $GROUP + fi rm -f $LOCKFILE fi trap '' 1 2 3 6 10 15 |