summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTar Committer <tar@ocjtech.us>2004-03-14 17:00:09 +0000
committerTar Committer <tar@ocjtech.us>2004-03-14 17:00:09 +0000
commit381d322caf5928732f3d478d80e70acfccd67f99 (patch)
treed52aa26f9698cd869eca3f09661bfc05a7008a28
parent989312339ea2e16579803a48700628c5469e327a (diff)
downloadrancid-381d322caf5928732f3d478d80e70acfccd67f99.tar.gz
rancid-381d322caf5928732f3d478d80e70acfccd67f99.tar.xz
rancid-381d322caf5928732f3d478d80e70acfccd67f99.zip
Imported from rancid-2.3.tar.gz.rancid-2.3
-rw-r--r--CHANGES33
-rw-r--r--FAQ11
-rw-r--r--Makefile.am8
-rw-r--r--Makefile.in14
-rw-r--r--Todo2
-rw-r--r--bin/Makefile.in4
-rw-r--r--bin/alogin.in4
-rw-r--r--bin/blogin.in9
-rw-r--r--bin/clogin.in34
-rw-r--r--bin/control_rancid.in16
-rw-r--r--bin/elogin.in4
-rw-r--r--bin/flogin.in9
-rw-r--r--bin/francid.in21
-rw-r--r--bin/hlogin.in9
-rw-r--r--bin/htlogin.in4
-rw-r--r--bin/jlogin.in31
-rw-r--r--bin/jrancid.in3
-rw-r--r--bin/lg.cgi.in28
-rw-r--r--bin/lgform.cgi.in28
-rw-r--r--bin/nlogin.in4
-rw-r--r--bin/nslogin.in10
-rw-r--r--bin/rancid-run.in85
-rw-r--r--bin/rancid.in32
-rw-r--r--bin/rivlogin.in221
-rw-r--r--bin/tntlogin.in4
-rw-r--r--bin/xrancid.in8
-rwxr-xr-xconfigure194
-rw-r--r--configure.in83
-rw-r--r--etc/Makefile.am12
-rw-r--r--etc/Makefile.in11
-rw-r--r--etc/rancid.conf.sample.in12
-rw-r--r--include/Makefile.in4
-rw-r--r--include/version.h2
-rw-r--r--include/version.h.in2
-rw-r--r--man/Makefile.in4
-rw-r--r--man/clogin.114
-rw-r--r--man/cloginrc.529
-rw-r--r--man/control_rancid.17
-rw-r--r--man/lg.conf.5.in2
-rw-r--r--man/lg_intro.1.in4
-rw-r--r--man/rancid-run.123
-rw-r--r--man/rancid.1126
-rw-r--r--man/rancid.conf.5.in18
-rw-r--r--man/rancid_intro.17
-rw-r--r--share/Makefile.in4
-rw-r--r--share/lgnotes.html3
46 files changed, 738 insertions, 459 deletions
diff --git a/CHANGES b/CHANGES
index fb139cf..bc69f27 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,14 +1,45 @@
-2.3.rc1
+2.3
The following files have been moved to make rancid more
install/pkg/port/rpm friendly.
*** bin/env has been moved to etc/rancid.conf ***
*** bin/hpfilter has been renamed hpuifilter ***
*** util/lg/lg.conf has been moved to etc/lg.conf ***
*** util/lg/lg*.cgi have been moved to bin/lg*cgi ***
+ *** bin/create_cvs has been renamed rancid-cvs ***
+ *** bin/do-diffs has been renamed rancid-run ***
Note: existing configuration files are *NOT* copied/moved for you
bin/rename is no longer shipped with rancid
+ rancid.conf: add MAILDOMAIN knob - from David C.
+
+ clogin: allow the port to be specified for method ssh
+
+ jlogin: add cloginrc passphrase directive and order of precedence is
+ cmd-line -r value -> passphrase -> password
+
+ xrancid: do 'show diag' instead of 'show diagnostics' as the
+ longer version has sometimes timed out.
+
+ rancid: filter file vlan.dat from show flash on IOS switches
+
+ rancid: parse cisco 1760's DSP slot show diag output
+
+ francid: reorder listing of ports in a vlans - from Niels Bakker and
+ Steven Bakker
+
+ clogin: disable session logging w/ -c on catos - from Jason Ornstein
+
+ rancid: add Processor ID to save output
+
+ *login: handle TCL meta-characters in cloginrc directive values
+
+ francid: correctly parse modules in slots >= 10. from Niels Bakker
+
+ run cvs delete code even when router.db is empty.
+
+ Riverstone/Enterasys updates from Andrew Fort
+
rancid.conf: add LOGDIR variable - see rancid.conf(5)
rancid: add show spe version and parse FRU show diag output
diff --git a/FAQ b/FAQ
index 210700e..2bea477 100644
--- a/FAQ
+++ b/FAQ
@@ -144,6 +144,13 @@ A. As far as I know, CVS does not provide a way to remove directories. First,
% cd <LOCALSTATEDIR>
% rm -rf fubar CVS/fubar
+Q. I need a web interface to the rancid CVS repository, for the CVS unsavvy.
+A. cvsweb works with rancid. Other similar software may as well.
+ http://www.freebsd.org/projects/cvsweb.html
+ cvsweb.conf:
+ @CVSrepositories = (
+ 'rancid' => ['RANCID CVS, '/full_path_to_the_RANCID_CVS'],
+ where the path will be <LOCALSTATEDIR>/CVS.
3) General
@@ -189,8 +196,8 @@ Q. Are there any characters in the banner that rancid has problems with OR
A. The trickiest part about clogin (et al) is recognizing the prompt
correctly. clogin looks for '>' and '#' to figure out if it is logged
in or in enable mode. So if you have a '>' or '#' in your login banner
- (other other motd), then clogin gets all confused and will not be
- able to log in correctly, and thus rancid will fail.
+ (or other motd), then clogin gets all confused and will not be able to log
+ in correctly, and thus rancid will fail.
Don't use '>' or '#' in your prompt or in your banner or other motd.
diff --git a/Makefile.am b/Makefile.am
index df32f4f..01866f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
## A Makefile.in is supplied, in case you do not have automake.
-## $Id: Makefile.am,v 1.19 2004/01/10 22:47:29 heas Exp $
+## $Id: Makefile.am,v 1.20 2004/01/13 17:24:49 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -37,5 +37,9 @@ SUBDIRS = . include etc bin man share
# sysconfdir is here because etc/Makefile uses a script to be careful about
# installing rancid.conf, not over-writing an existing one.
+DIRS2_CREATE=$(prefix) $(sysconfdir)
+if MK_LCLSTATEDIR
+DIRS2_CREATE+=$(localstatedir)
+endif
install-data-hook:
- $(mkinstalldirs) $(prefix) $(localstatedir) $(sysconfdir);
+ $(mkinstalldirs) $(DIRS2_CREATE);
diff --git a/Makefile.in b/Makefile.in
index 2c7c59e..6443baf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,6 +34,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+@MK_LCLSTATEDIR_TRUE@am__append_1 = $(localstatedir)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure COPYING \
@@ -89,6 +90,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMM = @COMM@
+CONF_INSTALL_FALSE = @CONF_INSTALL_FALSE@
+CONF_INSTALL_TRUE = @CONF_INSTALL_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CVS = @CVS@
@@ -121,6 +124,8 @@ MAILPLUS = @MAILPLUS@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
+MK_LCLSTATEDIR_FALSE = @MK_LCLSTATEDIR_FALSE@
+MK_LCLSTATEDIR_TRUE = @MK_LCLSTATEDIR_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -183,6 +188,10 @@ EXTRA_DIST = BUGS Todo configure install-sh \
# mkinstalldirs will create the install destination before descending into
# the subdirs.
SUBDIRS = . include etc bin man share
+
+# sysconfdir is here because etc/Makefile uses a script to be careful about
+# installing rancid.conf, not over-writing an existing one.
+DIRS2_CREATE = $(prefix) $(sysconfdir) $(am__append_1)
all: all-recursive
.SUFFIXES:
@@ -594,11 +603,8 @@ uninstall-info: uninstall-info-recursive
@SET_MAKE@
-
-# sysconfdir is here because etc/Makefile uses a script to be careful about
-# installing rancid.conf, not over-writing an existing one.
install-data-hook:
- $(mkinstalldirs) $(prefix) $(localstatedir) $(sysconfdir);
+ $(mkinstalldirs) $(DIRS2_CREATE);
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/Todo b/Todo
index 97ded87..05343c4 100644
--- a/Todo
+++ b/Todo
@@ -31,7 +31,7 @@
- should *login emmit "clogin error:" or "*login error:" to make matches for
login failures definitive?
- would like hpfilter to be more friendly to interactive logins
-- rancid with zebra? via vtysh?
+- rancid with zebra via vtysh?
- rancid for unix?
- would be nice if it were possible to add additional commands to be run
per-platform as a user desires. how could the user also provide a
diff --git a/bin/Makefile.in b/bin/Makefile.in
index eedc795..dac26ed 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -109,6 +109,8 @@ CCDEPMODE = @CCDEPMODE@
#CFLAGS += -g
CFLAGS = -g -O0
COMM = @COMM@
+CONF_INSTALL_FALSE = @CONF_INSTALL_FALSE@
+CONF_INSTALL_TRUE = @CONF_INSTALL_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CVS = @CVS@
@@ -141,6 +143,8 @@ MAILPLUS = @MAILPLUS@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
+MK_LCLSTATEDIR_FALSE = @MK_LCLSTATEDIR_FALSE@
+MK_LCLSTATEDIR_TRUE = @MK_LCLSTATEDIR_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/bin/alogin.in b/bin/alogin.in
index 91623fb..8937b95 100644
--- a/bin/alogin.in
+++ b/bin/alogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: alogin.in,v 1.22 2004/01/11 05:39:15 heas Exp $
+## $Id: alogin.in,v 1.23 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -43,7 +43,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 1
+set avenable 1
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
diff --git a/bin/blogin.in b/bin/blogin.in
index 92d2e8c..90843ed 100644
--- a/bin/blogin.in
+++ b/bin/blogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: blogin.in,v 1.22 2004/01/11 05:39:15 heas Exp $
+## $Id: blogin.in,v 1.23 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -46,7 +46,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 0
+set avenable 0
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
@@ -183,11 +183,11 @@ for {set i 0} {$i < $argc} {incr i} {
set do_command 1
# Do we enable?
} -noenable {
- set enable 0
+ set avenable 0
# Does tacacs automatically enable us?
} -autoenable {
set avautoenable 1
- set enable 0
+ set avenable 0
} -* {
send_user "\nError: Unknown argument! $arg\n"
send_user $usage
@@ -498,6 +498,7 @@ foreach router [lrange $argv $i end] {
set prompt "#"
} else {
set autoenable 0
+ set enable $avenable
set prompt ">"
}
}
diff --git a/bin/clogin.in b/bin/clogin.in
index 281d634..dd8b817 100644
--- a/bin/clogin.in
+++ b/bin/clogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: clogin.in,v 1.72 2004/01/11 05:39:15 heas Exp $
+## $Id: clogin.in,v 1.77 2004/03/12 05:44:06 asp Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -47,7 +47,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 1
+set avenable 1
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
@@ -189,11 +189,11 @@ for {set i 0} {$i < $argc} {incr i} {
set do_command 1
# Do we enable?
} -noenable {
- set enable 0
+ set avenable 0
# Does tacacs automatically enable us?
} -autoenable {
set avautoenable 1
- set enable 0
+ set avenable 0
} -* {
send_user "\nError: Unknown argument! $arg\n"
send_user $usage
@@ -306,8 +306,15 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
send_user "\nError: telnet failed: $reason\n"
exit 1
}
- } elseif ![string compare $prog "ssh"] {
- if [ catch {spawn $sshcmd -c $cyphertype -x -l $user $router} reason ] {
+ } elseif [string match "ssh*" $prog] {
+ regexp {ssh(:([^[:space:]]+))*} $prog command suffix port
+ if {"$port" == ""} {
+ set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user $router} reason ]
+
+ } else {
+ set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user -p $port $router} reason ]
+ }
+ if { $retval } {
send_user "\nError: $sshcmd failed: $reason\n"
exit 1
}
@@ -403,7 +410,12 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
send_user "\nError: Check your passwd for $router\n"
return 1
}
- -re "^Enter Selection: " {
+ "Press any key to continue." {
+ # send_user "Pressing the ANY key\n"
+ send "\r"
+ exp_continue
+ }
+ -re "Enter Selection: " {
# Catalyst 1900s have some lame menu. Enter
# K to reach a command-line.
send "K\r"
@@ -453,8 +465,8 @@ proc do_enable { enauser enapasswd } {
-re "$e_prompt" { send "$enapasswd\r"; exp_continue}
"#" { set prompt "#" }
"(enable)" { set prompt "> (enable) " }
- "denied" {
- # % Access denied - from local auth
+ -re "(denied|Sorry|Incorrect)" {
+ # % Access denied - from local auth and poss. others
send_user "\nError: Check your Enable passwd\n";
return 1
}
@@ -485,6 +497,9 @@ proc run_commands { prompt command } {
if { [ string compare "extreme" "$platform" ] } {
if [ regexp -- ".*> .*enable" "$prompt" ] {
send "set length 0\r"
+ # This is ugly, but reduces code duplication, allowing the
+ # subsequent expects to handle everything as normal.
+ set command "set logging session disable\r;$command"
} else {
send "term length 0\r"
}
@@ -618,6 +633,7 @@ foreach router [lrange $argv $i end] {
set prompt "(#| \\(enable\\))"
} else {
set autoenable 0
+ set enable $avenable
set prompt ">"
}
}
diff --git a/bin/control_rancid.in b/bin/control_rancid.in
index f51a21b..bcfd316 100644
--- a/bin/control_rancid.in
+++ b/bin/control_rancid.in
@@ -1,6 +1,6 @@
#! /bin/sh
##
-## $Id: control_rancid.in,v 1.61 2004/01/11 05:25:13 hank Exp $
+## $Id: control_rancid.in,v 1.64 2004/03/12 23:13:09 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -82,8 +82,9 @@ TMP=${TMPDIR:=/tmp}/rancid.$GROUP.$$
trap 'rm -fr $TMP;' 1 2 15
# the receipient(s) of diffs
-mailrcpt=${mailrcpt:-"@MAILPLUS@$GROUP"}; export mailrcpt
-adminmailrcpt=${mailrcpt:-"@ADMINMAILPLUS@$GROUP"}; export adminmailrcpt
+mailrcpt=${mailrcpt:-"@MAILPLUS@${GROUP}${MAILDOMAIN}"}; export mailrcpt
+adminmailrcpt=${mailrcpt:-"@ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"};
+export adminmailrcpt
# Number of things par should run in parallel.
PAR_COUNT=${PAR_COUNT:-5}
@@ -127,9 +128,6 @@ then
echo "$DIR/router.db does not exist."
) | sendmail -t
exit 1;
-elif [ ! -s $DIR/router.db ]
-then
- exit
fi
# generate the list of all, up, & down routers
@@ -140,15 +138,15 @@ sed -e '/^#/d' -e 's/^ *//' -e 's/ *$//' -e 's/ *: */:/g' router.db |
sort -u > routers.db
cut -d: -f1,2 routers.db > routers.all.new
if [ ! -f routers.all ] ; then touch routers.all; fi
-diff routers.all routers.all.new > /dev/null 2>&1; RALL=$?
+@DIFF_CMD@ routers.all routers.all.new > /dev/null 2>&1; RALL=$?
@PERLV@ -F: -ane '{($F[0] =~ tr@A-Z@a-z@,print $_)
if ($F[2] !~ /^up$/i);}' routers.db > routers.down.new
if [ ! -f routers.down ] ; then touch routers.down; fi
-diff routers.down routers.down.new > /dev/null 2>&1; RDOWN=$?
+@DIFF_CMD@ routers.down routers.down.new > /dev/null 2>&1; RDOWN=$?
@PERLV@ -F: -ane '{($F[0] =~ tr@A-Z@a-z@,print "$F[0]:$F[1]\n")
if ($F[2] =~ /^up$/i);}' routers.db > routers.up.new
if [ ! -f routers.up ] ; then touch routers.up; fi
-diff routers.up routers.up.new > /dev/null 2>&1; RUP=$?
+@DIFF_CMD@ routers.up routers.up.new > /dev/null 2>&1; RUP=$?
if [ $RALL -ne 0 -o $RDOWN -ne 0 -o $RUP -ne 0 ]
then
diff --git a/bin/elogin.in b/bin/elogin.in
index 651d7fb..0a41285 100644
--- a/bin/elogin.in
+++ b/bin/elogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: elogin.in,v 1.27 2004/01/11 05:39:15 heas Exp $
+## $Id: elogin.in,v 1.28 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -40,7 +40,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 1
+set avenable 1
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
diff --git a/bin/flogin.in b/bin/flogin.in
index 169e522..35af3cd 100644
--- a/bin/flogin.in
+++ b/bin/flogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: flogin.in,v 1.32 2004/01/11 05:39:15 heas Exp $
+## $Id: flogin.in,v 1.33 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -50,7 +50,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 1
+set avenable 1
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
@@ -186,11 +186,11 @@ for {set i 0} {$i < $argc} {incr i} {
set do_command 1
# Do we enable?
} -noenable {
- set enable 0
+ set avenable 0
# Does tacacs automatically enable us?
} -autoenable {
set avautoenable 1
- set enable 0
+ set avenable 0
} -* {
send_user "\nError: Unknown argument! $arg\n"
send_user $usage
@@ -535,6 +535,7 @@ foreach router [lrange $argv $i end] {
set prompt "#"
} else {
set autoenable 0
+ set enable $avenable
set prompt ">"
}
}
diff --git a/bin/francid.in b/bin/francid.in
index e1fd284..cc3acd6 100644
--- a/bin/francid.in
+++ b/bin/francid.in
@@ -1,6 +1,6 @@
#! @PERLV_PATH@
##
-## $Id: francid.in,v 1.26 2004/01/11 03:49:13 heas Exp $
+## $Id: francid.in,v 1.28 2004/03/03 00:33:48 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -154,7 +154,7 @@ sub ShowVersion {
s/^\s*(HW|SW)/$1/;
s/^\s*(Compiled on)/SW: $1/;
#s/^(HW.*)/$1\n/;
- if (/^SL (\d)/) {
+ if (/^SL (\d+)/) {
$slot = "Slot $1";
s/^SL \d+/$slot/;
}
@@ -301,6 +301,23 @@ sub WriteTerm {
next;
}
+ # reorder listing of ports in a vlan
+ if (/^ (?:un)?tagged ethe/) {
+ chomp;
+ s/^\s+//;
+ s/\s+$//;
+
+ my @list = split /\s+ethe\s+/, $_;
+ my $tagtype = shift @list;
+
+ while (@list) {
+ ProcessHistory("","","",
+ " $tagtype ethe " . (shift @list) . "\n");
+ }
+ next;
+ }
+
+
ProcessHistory("","","","$_");
# end of config
if (/^end$/) {
diff --git a/bin/hlogin.in b/bin/hlogin.in
index 6af11b4..a98e926 100644
--- a/bin/hlogin.in
+++ b/bin/hlogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: hlogin.in,v 1.21 2004/01/11 05:39:15 heas Exp $
+## $Id: hlogin.in,v 1.22 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -47,7 +47,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 1
+set avenable 1
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
@@ -189,12 +189,12 @@ for {set i 0} {$i < $argc} {incr i} {
set do_command 1
# Do we enable?
} -noenable {
- set enable 0
+ set avenable 0
# Does tacacs automatically enable us?
} -autoenable {
# hp does not autoenable
#set autoenable 1
- #set enable 0
+ #set avenable 0
} -* {
send_user "\nError: Unknown argument! $arg\n"
send_user $usage
@@ -570,6 +570,7 @@ foreach router [lrange $argv $i end] {
set prompt "#"
} else {
set autoenable 0
+ set enable $avenable
set prompt ">"
}
}
diff --git a/bin/htlogin.in b/bin/htlogin.in
index 8e9c5f5..01de69c 100644
--- a/bin/htlogin.in
+++ b/bin/htlogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: htlogin.in,v 1.7 2004/01/11 05:39:15 heas Exp $
+## $Id: htlogin.in,v 1.8 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -42,7 +42,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 1
+set avenable 1
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
diff --git a/bin/jlogin.in b/bin/jlogin.in
index 31be4f6..afa860e 100644
--- a/bin/jlogin.in
+++ b/bin/jlogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: jlogin.in,v 1.41 2004/01/11 05:39:15 heas Exp $
+## $Id: jlogin.in,v 1.46 2004/03/11 19:36:25 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -42,12 +42,10 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 1
+set avenable 1
# The default is to look in the password file to find the passwords. This
# tracks if we receive them on the command line.
set do_passwd 1
-# No passphrase by default
-set passphrase ""
# Find the user in the ENV, or use the unix userid.
if {[ info exists env(CISCO_USER) ] } {
@@ -112,7 +110,7 @@ for {set i 0} {$i < $argc} {incr i} {
-R* {
if {! [ regexp .\[rR\](.+) $arg ignore passphrase]} {
incr i
- set passphrase [ lindex $argv $i ]
+ set avpassphrase [ lindex $argv $i ]
}
# Expect script to run.
} -s* -
@@ -345,8 +343,12 @@ proc login { router user passwd cmethod cyphertype identfile} {
catch {close};
send_user "\nError: Unknown host\n"; wait; return 1
}
- -re "Enter passphrase for RSA key '\[^'\]*': " {
- send_user "\nKey has passphrase!\n"
+ "Login incorrect" {
+ send_user "\nError: Check your password for $router\n"
+ catch {close}; wait; return 1
+ }
+ -re "Enter passphrase.*: " {
+ # sleep briefly to allow time for stty -echo
sleep 1
send "$passphrase\r"
exp_continue }
@@ -465,10 +467,17 @@ foreach router [lrange $argv $i end] {
}
}
- # figure out identity file to use
- set identfile ""
- if {[info exists identity]} {
- set identfile [join [lindex [find identity $router] 0] ""]
+ # Figure out identity file to use
+ set identfile [join [lindex [find identity $router] 0] ""]
+
+ # Figure out passphrase to use
+ if {[info exists avpassphrase]} {
+ set passphrase $avpassphrase
+ } else {
+ set passphrase [join [lindex [find passphrase $router] 0] ""]
+ }
+ if { ! [string length "$passphrase"]} {
+ set passphrase $passwd
}
# Figure out ssh cypher type
diff --git a/bin/jrancid.in b/bin/jrancid.in
index 2793446..1217931 100644
--- a/bin/jrancid.in
+++ b/bin/jrancid.in
@@ -1,6 +1,6 @@
#! @PERLV_PATH@
##
-## $Id: jrancid.in,v 1.58 2004/01/11 03:49:13 heas Exp $
+## $Id: jrancid.in,v 1.59 2004/03/11 23:58:59 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -337,6 +337,7 @@ sub ShowChassisSCB {
sub ShowChassisAlarms {
print STDERR " In ShowChassisAlarms: $_" if ($debug);
+ s/^[a-z]+@//;
ProcessHistory("","","","# $_");
while (<INPUT>) {
tr/\015//d;
diff --git a/bin/lg.cgi.in b/bin/lg.cgi.in
index ad08c68..8b09847 100644
--- a/bin/lg.cgi.in
+++ b/bin/lg.cgi.in
@@ -1,6 +1,6 @@
#! @PERLV_PATH@
##
-## $Id: lg.cgi.in,v 1.47 2004/01/11 03:49:13 heas Exp $
+## $Id: lg.cgi.in,v 1.50 2004/03/10 23:01:28 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -27,8 +27,8 @@
# vars: query, router, args
BEGIN {
-$me = $0;
-$me =~ s/.*\/(\S+)$/$1/;
+ $me = $0;
+ $me =~ s/.*\/(\S+)$/$1/;
}
use CGI qw/:standard escapeHTML/;
@@ -38,6 +38,7 @@ use LockFile::Simple qw(lock trylock unlock);
my($BASEDIR) = "@prefix@";
my($SYSCONFDIR) = "@sysconfdir@";
+my($LOCALSTATEDIR) = "@localstatedir@";
my($pingcmd) = "@LG_PING_CMD@";
my($query, $max_time_diff, $cache_dir, $cloginrc, @results);
@@ -134,23 +135,24 @@ sub readrouters
# if the router.db file does not exist, try to compile the list from
# the rancid group router.db files.
local(*DIR);
- if (! opendir(DIR, $BASEDIR)) {
- dolog(LOG_ERR, "ERROR: couldn\'t read $BASEDIR: $!\n");
+ if (! opendir(DIR, $LOCALSTATEDIR)) {
+ dolog(LOG_ERR, "ERROR: couldn\'t read $LOCALSTATEDIR: $!\n");
} else {
while ($dir = readdir(DIR)) {
- next if ($dir =~ /^(\.|\.\.|CVS|bin|etc|logs|util)$/);
- push(@dirs, $dir) if (-d "$BASEDIR/$dir");
+ next if ($dir =~ /^(\.|\.\.|\.ssh|CVS|bin|etc|logs|util)$/);
+ push(@dirs, $dir) if (-d "$LOCALSTATEDIR/$dir");
}
closedir(DIR);
foreach $dir (@dirs) {
- if (! opendir(DIR, "$BASEDIR/$dir")) {
- dolog(LOG_ERR, "ERROR: couldn\'t read $BASEDIR/$dir: $!\n");
+ if (! opendir(DIR, "$LOCALSTATEDIR/$dir")) {
+ dolog(LOG_ERR,
+ "ERROR: couldn\'t read $LOCALSTATEDIR/$dir: $!\n");
next;
}
closedir(DIR);
- next if (! -f "$BASEDIR/$dir/router.db");
- if (open(RTR, "< $BASEDIR/$dir/router.db")) {
+ next if (! -f "$LOCALSTATEDIR/$dir/router.db");
+ if (open(RTR, "< $LOCALSTATEDIR/$dir/router.db")) {
while (<RTR>) {
next if (/^\s*(#|$)/);
# fqdn:mfg:state
@@ -162,7 +164,7 @@ sub readrouters
close(RTR);
} else {
dolog(LOG_ERR, "ERROR: couldn\'t open the router.db " .
- "file: $BASEDIR/$dir/router.db: $!\n");
+ "file: $LOCALSTATEDIR/$dir/router.db: $!\n");
}
}
}
@@ -430,7 +432,7 @@ $max_lock_hold = 300;
if (defined($LG_CLOGINRC)) {
$cloginrc = $LG_CLOGINRC;
} else {
- $cloginrc = "$ENV(HOME)/.cloginrc";
+ $cloginrc = $ENV{HOME} . "/.cloginrc";
}
$query = new CGI;
diff --git a/bin/lgform.cgi.in b/bin/lgform.cgi.in
index 461ae68..f680a13 100644
--- a/bin/lgform.cgi.in
+++ b/bin/lgform.cgi.in
@@ -1,6 +1,6 @@
#! @PERLV_PATH@
##
-## $Id: lgform.cgi.in,v 1.25 2004/01/11 03:49:13 heas Exp $
+## $Id: lgform.cgi.in,v 1.28 2004/03/10 22:41:54 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -26,11 +26,18 @@
# lgform.cgi - Looking glass front-end
# produces html form for calling lg.cgi
+BEGIN {
+ $me = $0;
+ $me =~ s/.*\/(\S+)$/$1/;
+}
+
use CGI qw/:standard/;
+use Sys::Syslog;
my(@rtrlist, %rtrlabels);
my($BASEDIR) = "@prefix@";
my($SYSCONFDIR) = "@sysconfdir@";
+my($LOCALSTATEDIR) = "@localstatedir@";
# note: the following functions are duplicated between lgform.cgi and lg.cgi
# to avoid the need for module inclusion headaches from within a httpd context.
@@ -118,23 +125,24 @@ sub readrouters
# if the router.db file does not exist, try to compile the list from
# the rancid group router.db files.
local(*DIR);
- if (! opendir(DIR, $BASEDIR)) {
- dolog(LOG_ERR, "ERROR: couldn\'t read $BASEDIR: $!\n");
+ if (! opendir(DIR, $LOCALSTATEDIR)) {
+ dolog(LOG_ERR, "ERROR: couldn\'t read $LOCALSTATEDIR: $!\n");
} else {
while ($dir = readdir(DIR)) {
- next if ($dir =~ /^(\.|\.\.|CVS|bin|etc|logs|util)$/);
- push(@dirs, $dir) if (-d "$BASEDIR/$dir");
+ next if ($dir =~ /^(\.|\.\.|\.ssh|CVS|bin|etc|logs|util)$/);
+ push(@dirs, $dir) if (-d "$LOCALSTATEDIR/$dir");
}
closedir(DIR);
foreach $dir (@dirs) {
- if (! opendir(DIR, "$BASEDIR/$dir")) {
- dolog(LOG_ERR, "ERROR: couldn\'t read $BASEDIR/$dir: $!\n");
+ if (! opendir(DIR, "$LOCALSTATEDIR/$dir")) {
+ dolog(LOG_ERR,
+ "ERROR: couldn\'t read $LOCALSTATEDIR/$dir: $!\n");
next;
}
closedir(DIR);
- next if (! -f "$BASEDIR/$dir/router.db");
- if (open(RTR, "< $BASEDIR/$dir/router.db")) {
+ next if (! -f "$LOCALSTATEDIR/$dir/router.db");
+ if (open(RTR, "< $LOCALSTATEDIR/$dir/router.db")) {
while (<RTR>) {
next if (/^\s*(#|$)/);
# fqdn:mfg:state
@@ -146,7 +154,7 @@ sub readrouters
close(RTR);
} else {
dolog(LOG_ERR, "ERROR: couldn\'t open the router.db " .
- "file: $BASEDIR/$dir/router.db: $!\n");
+ "file: $LOCALSTATEDIR/$dir/router.db: $!\n");
}
}
}
diff --git a/bin/nlogin.in b/bin/nlogin.in
index 685c759..9c6f8b8 100644
--- a/bin/nlogin.in
+++ b/bin/nlogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: nlogin.in,v 1.14 2004/01/11 05:39:15 heas Exp $
+## $Id: nlogin.in,v 1.15 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -40,7 +40,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 0
+set avenable 0
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 1
diff --git a/bin/nslogin.in b/bin/nslogin.in
index 385f530..c4b8e8a 100644
--- a/bin/nslogin.in
+++ b/bin/nslogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: nslogin.in,v 1.10 2004/01/11 05:39:15 heas Exp $
+## $Id: nslogin.in,v 1.11 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -49,7 +49,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 1
set do_script 0
# The default is to automatically enable
-set enable 0
+set avenable 0
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 0
@@ -191,11 +191,11 @@ for {set i 0} {$i < $argc} {incr i} {
set do_command 1
# Do we enable?
} -noenable {
- set enable 0
+ set avenable 0
# Does tacacs automatically enable us?
} -autoenable {
set avautoenable 1
- set enable 0
+ set avenable 0
} -* {
send_user "\nError: Unknown argument! $arg\n"
send_user $usage
@@ -510,6 +510,8 @@ foreach router [lrange $argv $i end] {
# look for noenable option in .cloginrc
if { [find noenable $router] != "" } {
set enable 0
+ } else {
+ set enable $avenable
}
# Figure out passwords
diff --git a/bin/rancid-run.in b/bin/rancid-run.in
index b59b026..b09d8a0 100644
--- a/bin/rancid-run.in
+++ b/bin/rancid-run.in
@@ -1,6 +1,6 @@
#! /bin/sh
##
-## $Id: rancid-run.in,v 1.28 2004/01/11 06:11:23 hank Exp $
+## $Id: rancid-run.in,v 1.30 2004/03/12 23:17:28 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -88,49 +88,48 @@ fi
for GROUP in $LIST_OF_GROUPS
do
- LOCKFILE=$TMPDIR/.$GROUP.run.lock
-
- (
- echo starting: `date`
- echo
-
- if [ -f $LOCKFILE ]
- then
- echo hourly config diffs failed: $LOCKFILE exists
- ls -l $LOCKFILE
-
- # Send email if the lock file is old.
- if [ "X$LOCKTIME" = "X" ] ; then
- LOCKTIME=4
- fi
- @PERLV@ -e "\$t = (stat(\"$LOCKFILE\"))[9]; print \"OLD\\n\" if (time() - \$t >= $LOCKTIME*60*60);" > $TMPDIR/.$GROUP.old
- if [ -s $TMPDIR/.$GROUP.old ]
- then
- (
- echo "To: @ADMINMAILPLUS@$GROUP"
- echo "Subject: rancid hung - $GROUP"
- echo "Precedence: bulk"
- echo ""
-
- cat <<END
+ LOCKFILE=$TMPDIR/.$GROUP.run.lock
+
+ (
+ echo starting: `date`
+ echo
+
+ if [ -f $LOCKFILE ]
+ then
+ echo hourly config diffs failed: $LOCKFILE exists
+ ls -l $LOCKFILE
+
+ # Send email if the lock file is old.
+ if [ "X$LOCKTIME" = "X" ] ; then
+ LOCKTIME=4
+ fi
+ @PERLV@ -e "\$t = (stat(\"$LOCKFILE\"))[9]; print \"OLD\\n\" if (time() - \$t >= $LOCKTIME*60*60);" > $TMPDIR/.$GROUP.old
+ if [ -s $TMPDIR/.$GROUP.old ]
+ then
+ (
+ echo "To: @ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"
+ echo "Subject: rancid hung - $GROUP"
+ echo "Precedence: bulk"
+ echo ""
+
+ cat <<END
rancid $GROUP hung on `hostname`? Old lockfile still exists:
`ls -l $LOCKFILE`
END
- ) | sendmail -t
- fi
- rm -f $TMPDIR/.$GROUP.old
-
- else
- trap 'rm -fr $LOCKFILE;exit 1' 1 2 3 6 10 15
- touch $LOCKFILE
- if [ $? -eq 0 ] ; then
- control_rancid $CR_ARGV $GROUP
- rm -f $LOCKFILE
- fi
- trap '' 1 2 3 6 10 15
- fi
-
- echo
- echo ending: `date`
- ) >$LOGDIR/$GROUP.`date +%Y%m%d.%H%M%S` 2>&1
+ ) | sendmail -t
+ fi
+ rm -f $TMPDIR/.$GROUP.old
+ else
+ trap 'rm -fr $LOCKFILE;exit 1' 1 2 3 6 10 15
+ touch $LOCKFILE
+ if [ $? -eq 0 ] ; then
+ control_rancid $CR_ARGV $GROUP
+ rm -f $LOCKFILE
+ fi
+ trap '' 1 2 3 6 10 15
+ fi
+
+ echo
+ echo ending: `date`
+ ) >$LOGDIR/$GROUP.`date +%Y%m%d.%H%M%S` 2>&1
done
diff --git a/bin/rancid.in b/bin/rancid.in
index 27a5a48..4bc83ef 100644
--- a/bin/rancid.in
+++ b/bin/rancid.in
@@ -1,6 +1,6 @@
#! @PERLV_PATH@
##
-## $Id: rancid.in,v 1.168 2004/01/12 00:52:47 asp Exp $
+## $Id: rancid.in,v 1.172 2004/03/14 16:57:05 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -225,7 +225,17 @@ sub ShowVersion {
# incantations. for a slave, we dont get this info and its just a
# blank line.
$_ = <INPUT>;
- $_ = <INPUT> if (/processor board id/i);
+ if (/processor board id/i) {
+ my($sn);
+
+ if (/processor board id (\S+)/i) {
+ $sn = $1;
+ $sn =~ s/,$//;
+ ProcessHistory("COMMENTS","keysort","D9",
+ "!Processor ID: $sn\n");
+ }
+ $_ = <INPUT>;
+ }
$_ = "" if (! /(cpu at |processor: |$cpu processor,)/i);
tr/\015//d;
s/implementation/impl/i;
@@ -372,7 +382,6 @@ sub ShowIDprom {
/FRU is .(.*)\'/ && ($tmp = $1);
/Product Number = .(.*)\'/ &&
- ProcessHistory("COMMENTS","keysort","D0","!\n") &&
ProcessHistory("COMMENTS","keysort","D0",
"!Catalyst Chassis type: $1, $tmp\n");
/Serial Number = .([0-9A-Za-z]+)/ &&
@@ -461,7 +470,6 @@ sub ShowRSP {
/^$/ && next;
/^\s+Chassis model: (\S+)/ &&
- ProcessHistory("COMMENTS","keysort","D0","!\n") &&
ProcessHistory("COMMENTS","keysort","D1",
"!RSP Chassis model: $1\n") &&
next;
@@ -490,7 +498,6 @@ sub ShowGSR {
s/^<-+ More -+>\s*//;
/^$/ && next;
/^\s+Chassis: type (\S+) Fab Ver: (\S+)/ &&
- ProcessHistory("COMMENTS","keysort","D0","!\n") &&
ProcessHistory("COMMENTS","keysort","D1",
"!GSR Chassis type: $1 Fab Ver: $2\n") &&
next;
@@ -562,6 +569,7 @@ sub ShowFlash {
return(1) if /(Invalid input detected|Type help or )/;
# the pager can not be disabled per-session on the PIX
s/^<-+ More -+>\s*//;
+ /\s+vlan\.dat$/ && next;
ProcessHistory("FLASH","","","!Flash: $_");
}
ProcessHistory("","","","!\n");
@@ -880,6 +888,8 @@ sub ShowDiag {
$WIC = "/$2";
} elsif ($1 eq "WIC/VIC") {
$WIC = "/$2";
+ } elsif ($1 eq "DSP") {
+ $WIC = "/$2";
} elsif ($1 eq "Encryption AIM") {
$slot = "$2";
undef($WIC);
@@ -915,6 +925,15 @@ sub ShowDiag {
ProcessHistory("SLOT","keysort","B","!Slot $slot$WIC: type $_");
}
next;
+ } elsif (/^\s+(.* (DSP) Module) Slot (\d):/) {
+ # The 1760 (at least) has yet another format...where it has two
+ # dedicated DSP slots, and thus two slot 0s.
+ my($TYPE) = $1;
+ $WIC = "/$3";
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","B",
+ "!Slot $slot$WIC: type $TYPE\n");
+ next;
}
# yet another format. seen on 2600s w/ 12.1, but appears to be all
# 12.1, including 7200s & 3700s. Sometimes the PCB serial appears
@@ -929,7 +948,7 @@ sub ShowDiag {
while (<INPUT>) {
tr/\015//d;
- if (/0x..: /) {
+ if (/0x..: / || /^$/) {
# no effing idea why break does not work there
goto PerlSucks;
}
@@ -1531,6 +1550,7 @@ if ($ENV{"FILTER_PWDS"} =~ /no/i) {
ProcessHistory("","","","!RANCID-CONTENT-TYPE: cisco\n!\n");
ProcessHistory("COMMENTS","keysort","B0","!\n");
+ProcessHistory("COMMENTS","keysort","D0","!\n");
ProcessHistory("COMMENTS","keysort","F0","!\n");
ProcessHistory("COMMENTS","keysort","G0","!\n");
TOP: while(<INPUT>) {
diff --git a/bin/rivlogin.in b/bin/rivlogin.in
index 12554d5..4468fff 100644
--- a/bin/rivlogin.in
+++ b/bin/rivlogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: rivlogin.in,v 1.15 2004/01/11 05:39:15 heas Exp $
+## $Id: rivlogin.in,v 1.17 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -60,7 +60,7 @@ set do_script 0
set log_user 0
# The default CLI mode to login to is "enable" mode
-set enable 1
+set avenable 1
# The default is to look in the password file to find the passwords. This
# tracks if we receive them on the command line.
@@ -839,7 +839,7 @@ for {set idx 0} {$idx < $argc} {incr idx} {
set timeout [ lindex $argv $idx ]
} -noenable {
- set enable 0
+ set avenable 0
} -* {
puts "ERROR:unkown argument passed: $arg\n"
puts $usage
@@ -863,142 +863,133 @@ if { $idx == $argc } {
foreach router [lrange $argv $idx end] {
set router [string tolower $router]
-# Figure out passwords
-if {$verbose == 1} {
- puts "DEBUG: do_passwd = $do_passwd\n"
- puts "DEBUG: do_enablepasswd = $do_enapasswd\n"
-}
-
-if { $do_passwd || $do_enapasswd } {
- set pswd [find password $router]
- if { [llength $pswd] == 0 } {
- puts "ERROR: - no password for $router in $password_file.\n"
- exit 1
- }
- if { $do_enapasswd && [llength $pswd] < 2 } {
- puts "ERROR: no enable password found for $router in $password_file."
- exit 1
+ # Figure out passwords
+ if {$verbose == 1} {
+ puts "DEBUG: do_passwd = $do_passwd\n"
+ puts "DEBUG: do_enablepasswd = $do_enapasswd\n"
}
-
- set passwd [join [lindex $pswd 0] ""]
- set enapasswd [join [lindex $pswd 1] ""]
-}
-
-
-# Figure out user to login with if necessary
-
-if {[info exists username]} {
- # command line username
- set user $username
-} else {
- set user [join [find user $router] ""]
- if { "$user" == "" } { set user $default_user }
-}
-
-# Figure out username's password
-
-if {[info exists userpasswd]} {
- # command line username
- set userpswd $userpasswd
-} else {
- set userpswd [join [find userpassword $router] ""]
- if { "$userpswd" == "" } { set userpswd $passwd }
-}
-
-# Figure out enable username
-if {[info exists enausername]} {
- # command line enausername
- set enauser $enausername
-} else {
- set enauser [join [find enauser $router] ""]
- if { "$enauser" == "" } { set enauser $user }
-}
-
-# Login to the router, set my_prompt to router's cmd prompt
+ # look for noenable option in .cloginrc
+ if { [find noenable $router] != "" } {
+ set enable 0
+ } else {
+ set enable $avenable
+ }
-if {[login $router $user $userpswd $passwd $enapasswd ]} {
- if { $verbose == 1 } {
- puts "DEBUG: login to $router failed\n"
+ if { $do_passwd || $do_enapasswd } {
+ set pswd [find password $router]
+ if { [llength $pswd] == 0 } {
+ puts "ERROR: - no password for $router in $password_file.\n"
+ exit 1
+ }
+ if { $do_enapasswd && [llength $pswd] < 2 } {
+ puts "ERROR: no enable password found for $router in $password_file."
+ exit 1
+ }
+
+ set passwd [join [lindex $pswd 0] ""]
+ set enapasswd [join [lindex $pswd 1] ""]
}
- exit 1
-}
-if {$verbose == 1 } {
- puts "DEBUG: login completed ok\n"
-}
+ # Figure out user to login with if necessary
+ if {[info exists username]} {
+ # command line username
+ set user $username
+ } else {
+ set user [join [find user $router] ""]
+ if { "$user" == "" } { set user $default_user }
+ }
-if { $enable == 1 } {
+ # Figure out username's password
+ if {[info exists userpasswd]} {
+ # command line username
+ set userpswd $userpasswd
+ } else {
+ set userpswd [join [find userpassword $router] ""]
+ if { "$userpswd" == "" } { set userpswd $passwd }
+ }
- if { [do_enable $enauser $enapasswd $userpswd] == 1} {
+ # Figure out enable username
+ if {[info exists enausername]} {
+ # command line enausername
+ set enauser $enausername
+ } else {
+ set enauser [join [find enauser $router] ""]
+ if { "$enauser" == "" } { set enauser $user }
+ }
+
+ # Login to the router, set my_prompt to router's cmd prompt
+ if {[login $router $user $userpswd $passwd $enapasswd ]} {
if { $verbose == 1 } {
- puts "DEBUG: switch to enable mode on $router failed\n"
+ puts "DEBUG: login to $router failed\n"
}
exit 1
}
-}
-
-# run in one of three modes
-
-if { $do_command } {
- disable_cmd_autocomplete
- disable_cli_paging
-
- if {[ start_logfile $output_file] != 0 } {
- exit 1
+ if {$verbose == 1 } {
+ puts "DEBUG: login completed ok\n"
}
- if {[ run_commands $my_prompt $command ]} {
-
- log_file
- exit 1
-
- } else {
-
- logout $my_prompt
-
+ if { $enable == 1 } {
+ if { [do_enable $enauser $enapasswd $userpswd] == 1} {
+ if { $verbose == 1 } {
+ puts "DEBUG: switch to enable mode on $router failed\n"
+ }
+ exit 1
+ }
}
+
+ # run in one of three modes
+ if { $do_command } {
+ disable_cmd_autocomplete
+ disable_cli_paging
-} elseif { $do_script } {
-
- disable_cmd_autocomplete
- disable_cli_paging
-
- if {[ start_logfile $output_file] != 0 } {
- exit 1
- }
+ if { [start_logfile $output_file] != 0 } {
+ exit 1
+ }
- #if { [process_script_file $sfile] == 1} {
-# puts "DEBUG: logfile $output_file closed on error\n"
-# logout $my_prompt
-# exit 1
-# }
+ if {[ run_commands $my_prompt $command ]} {
+ log_file
+ exit 1
+ } else {
+ logout $my_prompt
+ }
+ } elseif { $do_script } {
+ disable_cmd_autocomplete
+ disable_cli_paging
+
+ if {[ start_logfile $output_file] != 0 } {
+ exit 1
+ }
- source_script_file $sfile
+# if { [process_script_file $sfile] == 1} {
+# puts "DEBUG: logfile $output_file closed on error\n"
+# logout $my_prompt
+# exit 1
+# }
- logout $my_prompt
+ source_script_file $sfile
-} else {
-
- label $router
- log_user 1
+ logout $my_prompt
+ } else {
+ label $router
+ log_user 1
- if {[ start_logfile $output_file] != 0 } {
- exit 1
+ if {[ start_logfile $output_file] != 0 } {
+ exit 1
+ }
+ interact
+ log_file
}
- interact
- log_file
-}
-if { $verbose == 1 } {
- puts "DEBUG: exiting normally.\n"
-}
+ if { $verbose == 1 } {
+ puts "DEBUG: exiting normally.\n"
+ }
-if { $logging == 1} {
- log_file
- strip_log $output_file $router
-}
+ if { $logging == 1} {
+ log_file
+ strip_log $output_file $router
+ }
}
# puts "\n"
diff --git a/bin/tntlogin.in b/bin/tntlogin.in
index 021f0d2..2eae6e3 100644
--- a/bin/tntlogin.in
+++ b/bin/tntlogin.in
@@ -1,6 +1,6 @@
#! @EXPECT_PATH@ --
##
-## $Id: tntlogin.in,v 1.11 2004/01/11 05:39:15 heas Exp $
+## $Id: tntlogin.in,v 1.12 2004/02/02 17:38:36 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -39,7 +39,7 @@ set password_file $env(HOME)/.cloginrc
set do_command 0
set do_script 0
# The default is to automatically enable
-set enable 0
+set avenable 0
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
set avautoenable 1
diff --git a/bin/xrancid.in b/bin/xrancid.in
index 4aeb1d3..b415c86 100644
--- a/bin/xrancid.in
+++ b/bin/xrancid.in
@@ -1,6 +1,6 @@
#! @PERLV_PATH@
##
-## $Id: xrancid.in,v 1.32 2004/01/11 03:49:13 heas Exp $
+## $Id: xrancid.in,v 1.33 2004/01/13 01:56:50 asp Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -180,7 +180,7 @@ sub ShowMemory {
return(0);
}
-# This routine parses "show diagnostics"
+# This routine parses "show diag"
sub ShowDiag {
print STDERR " In ShowDiag: $_" if ($debug);
@@ -376,7 +376,7 @@ sub DoNothing {print STDOUT;}
%commands=(
'show version' => "ShowVersion",
'show memory' => "ShowMemory",
- 'show diagnostics' => "ShowDiag",
+ 'show diag' => "ShowDiag",
'show switch' => "ShowSwitch",
'show slot' => "ShowSlot",
'show configuration detail' => "WriteTerm",
@@ -387,7 +387,7 @@ sub DoNothing {print STDOUT;}
@commands=(
"show version",
"show memory",
- "show diagnostics",
+ "show diag",
"show switch",
"show slot",
"show configuration detail",
diff --git a/configure b/configure
index ce3976d..ba71664 100755
--- a/configure
+++ b/configure
@@ -310,7 +310,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP U ANSI2KNR MAILPLUS ADMINMAILPLUS DIRNAME DIFF DIFF_CMD SENDMAIL TAR PERLV_PATH PERLV EXPECT_PATH PING_PATH LG_PING_CMD CVS COMM FIND GREP ID MKDIR RSH SORT SSH TELNET TOUCH ENV_PATH LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP U ANSI2KNR MK_LCLSTATEDIR_TRUE MK_LCLSTATEDIR_FALSE CONF_INSTALL_TRUE CONF_INSTALL_FALSE MAILPLUS ADMINMAILPLUS DIRNAME DIFF DIFF_CMD SENDMAIL TAR PERLV_PATH PERLV EXPECT_PATH PING_PATH LG_PING_CMD CVS COMM FIND GREP ID MKDIR RSH SORT SSH TELNET TOUCH ENV_PATH LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -848,6 +848,11 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors
+ --enable-mk-localstatedir
+ enable creation of the local state directory at
+ install time (default: yes)
+ --enable-conf-install enable install of sample .conf files in sysconfdir
+ (default: yes)
--enable-mail-plus enable mail to rancid+ addresses, instead of rancid-
--enable-adminmail-plus enable mail to rancid-admin+ addresses, instead of
rancid-admin-
@@ -4936,6 +4941,68 @@ fi
# Package-specific options/knobs
#
+# Check if user wants us to create LOCALSTATEDIR. If it's a package-system,
+# they might create it themselves for book-keeping sake; eg: NetBSD
+echo "$as_me:$LINENO: checking whether to create the local state directory at install time" >&5
+echo $ECHO_N "checking whether to create the local state directory at install time... $ECHO_C" >&6
+# Check whether --enable-mk-localstatedir or --disable-mk-localstatedir was given.
+if test "${enable_mk_localstatedir+set}" = set; then
+ enableval="$enable_mk_localstatedir"
+ if test "$enable_mk_localstatedir" = yes; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ enable_mk_localstatedir="yes"
+
+fi;
+
+
+if test "${enable_mk_localstatedir}" = yes; then
+ MK_LCLSTATEDIR_TRUE=
+ MK_LCLSTATEDIR_FALSE='#'
+else
+ MK_LCLSTATEDIR_TRUE='#'
+ MK_LCLSTATEDIR_FALSE=
+fi
+
+
+# Check if user wants us to create LOCALSTATEDIR. If it's a package-system,
+# they might create it themselves for book-keeping sake; eg: NetBSD
+echo "$as_me:$LINENO: checking whether to install sample .conf files in sysconfdir" >&5
+echo $ECHO_N "checking whether to install sample .conf files in sysconfdir... $ECHO_C" >&6
+# Check whether --enable-conf-install or --disable-conf-install was given.
+if test "${enable_conf_install+set}" = set; then
+ enableval="$enable_conf_install"
+ if test "$enable_conf_install" = yes; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ enable_conf_install="yes"
+
+fi;
+
+
+if test "${enable_conf_install}" = yes; then
+ CONF_INSTALL_TRUE=
+ CONF_INSTALL_FALSE='#'
+else
+ CONF_INSTALL_TRUE='#'
+ CONF_INSTALL_FALSE=
+fi
+
+
# Check for a preference for using mail addresses like rancid+group
# instead of the standard rancid-group
echo "$as_me:$LINENO: checking whether mail addresses should be in the rancid+ form" >&5
@@ -4965,25 +5032,25 @@ rd_cv_MAILPLUS=$MAILPLUS
# Check for a preference for using mail addresses like rancid+admin-group
# instead of the standard rancid-admin-group
-echo "$as_me:$LINENO: checking whether admin mail addresses should be in the rancid+ form" >&5
-echo $ECHO_N "checking whether admin mail addresses should be in the rancid+ form... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking whether admin mail addresses should be in the rancid-admin+ form" >&5
+echo $ECHO_N "checking whether admin mail addresses should be in the rancid-admin+ form... $ECHO_C" >&6
# Check whether --enable-adminmail-plus or --disable-adminmail-plus was given.
if test "${enable_adminmail_plus+set}" = set; then
enableval="$enable_adminmail_plus"
if test "$enable_adminmail_plus" = yes; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ echo "$as_me:$LINENO: result: rancid-admin+" >&5
+echo "${ECHO_T}rancid-admin+" >&6
ADMINMAILPLUS="rancid-admin+"
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: ${MAILPLUS}admin-" >&5
+echo "${ECHO_T}${MAILPLUS}admin-" >&6
ADMINMAILPLUS="${MAILPLUS}admin-"
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: ${MAILPLUS}admin-" >&5
+echo "${ECHO_T}${MAILPLUS}admin-" >&6
ADMINMAILPLUS="${MAILPLUS}admin-"
@@ -5030,74 +5097,40 @@ else
echo "${ECHO_T}no" >&6
fi
+
# locate GNU diff (one supporting the -u option)
-# Extract the first word of "diff", so it can be a program name with args.
-set dummy diff; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_DIFF+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $DIFF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="/usr/local/bin:/usr/gnu/bin:/usr/bin:/usr/contrib/bin"
-for as_dir in $as_dummy
+echo "$as_me:$LINENO: checking for a diff(1) that supports -u" >&5
+echo $ECHO_N "checking for a diff(1) that supports -u... $ECHO_C" >&6
+_DIFF_PATH=`echo $PATH:${prefix}/bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:/usr/gnu/bin:/usr/contrib/bin | sed -e 's/:/ /g'`
+for _diff in ${_DIFF_PATH} ;
do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_DIFF" && ac_cv_path_DIFF="no"
- ;;
-esac
-fi
-DIFF=$ac_cv_path_DIFF
-
-if test -n "$DIFF"; then
- echo "$as_me:$LINENO: result: $DIFF" >&5
-echo "${ECHO_T}$DIFF" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-if test $DIFF = no; then
- unset ac_cv_path_DIFF
- { { echo "$as_me:$LINENO: error: can't locate diff." >&5
-echo "$as_me: error: can't locate diff." >&2;}
- { (exit 1); exit 1; }; }
-else
- $DIFF -u /dev/null /dev/null > /dev/null 2>&1
- if test $? -ne 0; then
- $DIFF -C 2 /dev/null /dev/null > /dev/null 2>&1
+ if test -e ${_diff}/diff ; then
+ ${_diff}/diff -u /dev/null /dev/null > /dev/null 2>&1
if test $? -ne 0; then
- $DIFF -c2 /dev/null /dev/null > /dev/null 2>&1
- if test $? -ne 0; then
- { { echo "$as_me:$LINENO: error: can't locate a diff which accepts the -u option." >&5
-echo "$as_me: error: can't locate a diff which accepts the -u option." >&2;}
- { (exit 1); exit 1; }; }
- exit 1
- else
- DIFF_CMD="diff -c4"
+ if test "${ADIFF}" == "" ; then
+ ADIFF="${_diff}/diff"
+ ADIFF_CMD="diff -c -4"
fi
else
- DIFF_CMD="diff -C 4"
+ DIFF="${_diff}/diff"
+ DIFF_CMD="diff -u -4"
+ break
fi
- else
- DIFF_CMD="diff -u -4"
fi
+done
+if test "$DIFF" = "" ; then
+ DIFF=$ADIFF
+ DIFF_CMD=$ADIFF_CMD
+fi
+if test "$DIFF" = "" ; then
+ { { echo "$as_me:$LINENO: error: can't locate diff." >&5
+echo "$as_me: error: can't locate diff." >&2;}
+ { (exit 1); exit 1; }; }
fi
+echo "$as_me:$LINENO: result: ${DIFF_CMD}" >&5
+echo "${ECHO_T}${DIFF_CMD}" >&6
+rd_cv_DIFF=$DIFF
+
rd_cv_DIFF_CMD=$DIFF_CMD
@@ -5896,10 +5929,7 @@ else
echo "${ECHO_T}no" >&6
fi
-if test $DIFF = no; then
- ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SSH`"
-fi
-unset ac_cv_path_SSH
+ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SSH`"
# Extract the first word of "telnet", so it can be a program name with args.
set dummy telnet; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -6157,6 +6187,20 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${MK_LCLSTATEDIR_TRUE}" && test -z "${MK_LCLSTATEDIR_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MK_LCLSTATEDIR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MK_LCLSTATEDIR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${CONF_INSTALL_TRUE}" && test -z "${CONF_INSTALL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"CONF_INSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CONF_INSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -6774,6 +6818,10 @@ s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@U@,$U,;t t
s,@ANSI2KNR@,$ANSI2KNR,;t t
+s,@MK_LCLSTATEDIR_TRUE@,$MK_LCLSTATEDIR_TRUE,;t t
+s,@MK_LCLSTATEDIR_FALSE@,$MK_LCLSTATEDIR_FALSE,;t t
+s,@CONF_INSTALL_TRUE@,$CONF_INSTALL_TRUE,;t t
+s,@CONF_INSTALL_FALSE@,$CONF_INSTALL_FALSE,;t t
s,@MAILPLUS@,$MAILPLUS,;t t
s,@ADMINMAILPLUS@,$ADMINMAILPLUS,;t t
s,@DIRNAME@,$DIRNAME,;t t
diff --git a/configure.in b/configure.in
index 597b49e..cab2f8d 100644
--- a/configure.in
+++ b/configure.in
@@ -59,6 +59,36 @@ AC_TYPE_SIZE_T
# Package-specific options/knobs
#
+# Check if user wants us to create LOCALSTATEDIR. If it's a package-system,
+# they might create it themselves for book-keeping sake; eg: NetBSD
+AC_MSG_CHECKING([whether to create the local state directory at install time])
+AC_ARG_ENABLE(mk-localstatedir,
+ AS_HELP_STRING([--enable-mk-localstatedir], [enable creation of the local state directory at install time (default: yes)]),
+[if test "$enable_mk_localstatedir" = yes; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi],
+[AC_MSG_RESULT(yes)
+ enable_mk_localstatedir="yes"
+])
+AM_CONDITIONAL([MK_LCLSTATEDIR], [test "${enable_mk_localstatedir}" = yes])
+
+# Check if user wants us to create LOCALSTATEDIR. If it's a package-system,
+# they might create it themselves for book-keeping sake; eg: NetBSD
+AC_MSG_CHECKING([whether to install sample .conf files in sysconfdir])
+AC_ARG_ENABLE(conf-install,
+ AS_HELP_STRING([--enable-conf-install], [enable install of sample .conf files in sysconfdir (default: yes)]),
+[if test "$enable_conf_install" = yes; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi],
+[AC_MSG_RESULT(yes)
+ enable_conf_install="yes"
+])
+AM_CONDITIONAL([CONF_INSTALL], [test "${enable_conf_install}" = yes])
+
# Check for a preference for using mail addresses like rancid+group
# instead of the standard rancid-group
AC_MSG_CHECKING([whether mail addresses should be in the rancid+ form])
@@ -81,49 +111,55 @@ rd_cv_MAILPLUS=$MAILPLUS
# Check for a preference for using mail addresses like rancid+admin-group
# instead of the standard rancid-admin-group
-AC_MSG_CHECKING([whether admin mail addresses should be in the rancid+ form])
+AC_MSG_CHECKING([whether admin mail addresses should be in the rancid-admin+ form])
AC_ARG_ENABLE(adminmail-plus,
AS_HELP_STRING([--enable-adminmail-plus], [enable mail to rancid-admin+ addresses, instead of rancid-admin-]),
[if test "$enable_adminmail_plus" = yes; then
- AC_MSG_RESULT(yes)
+ AC_MSG_RESULT([rancid-admin+])
ADMINMAILPLUS="rancid-admin+"
AC_SUBST(ADMINMAILPLUS)
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([${MAILPLUS}admin-])
ADMINMAILPLUS="${MAILPLUS}admin-"
AC_SUBST(ADMINMAILPLUS)
fi],
-[AC_MSG_RESULT(no)
+[AC_MSG_RESULT([${MAILPLUS}admin-])
ADMINMAILPLUS="${MAILPLUS}admin-"
AC_SUBST(ADMINMAILPLUS)
])
rd_cv_ADMINMAILPLUS=$ADMINMAILPLUS
AC_PATH_PROG(DIRNAME,dirname,no)
+
# locate GNU diff (one supporting the -u option)
-AC_PATH_PROG(DIFF,diff,no, /usr/local/bin:/usr/gnu/bin:/usr/bin:/usr/contrib/bin)
-if test $DIFF = no; then
- unset ac_cv_path_DIFF
- AC_MSG_ERROR([can't locate diff.])
-else
- $DIFF -u /dev/null /dev/null > /dev/null 2>&1
- if test $? -ne 0; then
- $DIFF -C 2 /dev/null /dev/null > /dev/null 2>&1
+AC_MSG_CHECKING([for a diff(1) that supports -u])
+_DIFF_PATH=`echo $PATH:${prefix}/bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:/usr/gnu/bin:/usr/contrib/bin | sed -e 's/:/ /g'`
+for _diff in ${_DIFF_PATH} ;
+do
+ if test -e ${_diff}/diff ; then
+ ${_diff}/diff -u /dev/null /dev/null > /dev/null 2>&1
if test $? -ne 0; then
- $DIFF -c2 /dev/null /dev/null > /dev/null 2>&1
- if test $? -ne 0; then
- AC_MSG_ERROR([can't locate a diff which accepts the -u option.])
- exit 1
- else
- DIFF_CMD="diff -c4"
+ if test "${ADIFF}" == "" ; then
+ ADIFF="${_diff}/diff"
+ ADIFF_CMD="diff -c -4"
fi
else
- DIFF_CMD="diff -C 4"
+ DIFF="${_diff}/diff"
+ DIFF_CMD="diff -u -4"
+ break
fi
- else
- DIFF_CMD="diff -u -4"
fi
+done
+if test "$DIFF" = "" ; then
+ DIFF=$ADIFF
+ DIFF_CMD=$ADIFF_CMD
fi
+if test "$DIFF" = "" ; then
+ AC_MSG_ERROR([can't locate diff.])
+fi
+AC_MSG_RESULT([${DIFF_CMD}])
+rd_cv_DIFF=$DIFF
+AC_SUBST(DIFF)
rd_cv_DIFF_CMD=$DIFF_CMD
AC_SUBST(DIFF_CMD)
@@ -210,10 +246,7 @@ ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_RSH`"
AC_PATH_PROG(SORT,sort,no)
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SORT`"
AC_PATH_PROG(SSH,ssh,no)
-if test $DIFF = no; then
- ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SSH`"
-fi
-unset ac_cv_path_SSH
+ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SSH`"
AC_PATH_PROG(TELNET,telnet,no)
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_TELNET`"
AC_PATH_PROG(TOUCH,touch,no)
diff --git a/etc/Makefile.am b/etc/Makefile.am
index e44e781..10edcad 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
## A Makefile.in is supplied, in case you do not have automake.
-## $Id: Makefile.am,v 1.10 2004/01/11 03:43:50 heas Exp $
+## $Id: Makefile.am,v 1.11 2004/01/13 18:02:00 heas Exp $
##
## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
## All rights reserved.
@@ -28,8 +28,13 @@ EXTRA_DIST= $(pkgdata_DATA:%=%.in)
CLEANFILES= $(pkgdata_DATA)
+if CONF_INSTALL
+DO_CONF_INSTALL=yes
+endif
+
install-data-local: all
- @if test -f $(sysconfdir)/rancid.conf ; then \
+ @if test "$(DO_CONF_INSTALL)" = "yes"; then \
+ if test -f $(sysconfdir)/rancid.conf ; then \
echo ""; \
echo "WARNING: *** $(sysconfdir)/rancid.conf exists. See "; \
echo " *** $(pkgdatadir)/rancid.conf.sample for new"; \
@@ -46,7 +51,8 @@ install-data-local: all
echo ""; \
else \
$(INSTALL_DATA) lg.conf.sample $(sysconfdir)/lg.conf; \
- fi;
+ fi; \
+ fi
#clean:
# rm -f Makefile rancid.conf $(BIN_DATAS) $(BIN_PROGS)
diff --git a/etc/Makefile.in b/etc/Makefile.in
index 7a52e35..0c1a0ba 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -63,6 +63,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMM = @COMM@
+CONF_INSTALL_FALSE = @CONF_INSTALL_FALSE@
+CONF_INSTALL_TRUE = @CONF_INSTALL_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CVS = @CVS@
@@ -95,6 +97,8 @@ MAILPLUS = @MAILPLUS@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
+MK_LCLSTATEDIR_FALSE = @MK_LCLSTATEDIR_FALSE@
+MK_LCLSTATEDIR_TRUE = @MK_LCLSTATEDIR_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -151,6 +155,7 @@ AUTOMAKE_OPTIONS = foreign
pkgdata_DATA = lg.conf.sample rancid.conf.sample
EXTRA_DIST = $(pkgdata_DATA:%=%.in)
CLEANFILES = $(pkgdata_DATA)
+@CONF_INSTALL_TRUE@DO_CONF_INSTALL = yes
#clean:
# rm -f Makefile rancid.conf $(BIN_DATAS) $(BIN_PROGS)
@@ -342,7 +347,8 @@ uninstall-am: uninstall-info-am uninstall-pkgdataDATA
install-data-local: all
- @if test -f $(sysconfdir)/rancid.conf ; then \
+ @if test "$(DO_CONF_INSTALL)" = "yes"; then \
+ if test -f $(sysconfdir)/rancid.conf ; then \
echo ""; \
echo "WARNING: *** $(sysconfdir)/rancid.conf exists. See "; \
echo " *** $(pkgdatadir)/rancid.conf.sample for new"; \
@@ -359,7 +365,8 @@ install-data-local: all
echo ""; \
else \
$(INSTALL_DATA) lg.conf.sample $(sysconfdir)/lg.conf; \
- fi;
+ fi; \
+ fi
lg.conf.sample: Makefile $(srcdir)/lg.conf.sample.in
rm -f lg.conf.sample lg.conf.sample.tmp; \
diff --git a/etc/rancid.conf.sample.in b/etc/rancid.conf.sample.in
index c550c74..8cc1b09 100644
--- a/etc/rancid.conf.sample.in
+++ b/etc/rancid.conf.sample.in
@@ -5,6 +5,10 @@
#
TERM=network;export TERM
#
+# Create files w/o world read/write/exec permissins, but read/exec permissions
+# for group.
+umask 027
+#
# Under BASEDIR (i.e.: --localstatedir), there will be a "logs" directory for
# the logs from rancid and a directory for each group of routers defined in
# LIST_OF_GROUPS (below). In addition to these, there will be a "CVS"
@@ -53,7 +57,11 @@ OLDTIME=4; export OLDTIME
# For each group, define a list of people to receive the diffs.
# in sendmail's /etc/aliases.
# rancid-group: joe,moe@foo
-# rancid-group-admin: hostmaster
+# rancid-admin-group: hostmaster
# be sure to read ../README regarding aliases.
#
-umask 027
+# If your MTA configuration is broken or you want mail to be forwarded to a
+# domain not the same the local one, define that domain here. "@" must be
+# included, as this is simply appended to the usual recipients. It is NOT
+# appended to recipients specified in rancid-run's -m option.
+#MAILDOMAIN="@example.com"; export MAILDOMAIN
diff --git a/include/Makefile.in b/include/Makefile.in
index 1424aef..7e779a8 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -65,6 +65,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMM = @COMM@
+CONF_INSTALL_FALSE = @CONF_INSTALL_FALSE@
+CONF_INSTALL_TRUE = @CONF_INSTALL_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CVS = @CVS@
@@ -97,6 +99,8 @@ MAILPLUS = @MAILPLUS@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
+MK_LCLSTATEDIR_FALSE = @MK_LCLSTATEDIR_FALSE@
+MK_LCLSTATEDIR_TRUE = @MK_LCLSTATEDIR_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/include/version.h b/include/version.h
index 3cffb0b..0e45f49 100644
--- a/include/version.h
+++ b/include/version.h
@@ -4,6 +4,6 @@
/* pkg version */
char package[] = "rancid";
-char version[] = "2.3.rc1";
+char version[] = "2.3";
#endif
diff --git a/include/version.h.in b/include/version.h.in
index 3cffb0b..0e45f49 100644
--- a/include/version.h.in
+++ b/include/version.h.in
@@ -4,6 +4,6 @@
/* pkg version */
char package[] = "rancid";
-char version[] = "2.3.rc1";
+char version[] = "2.3";
#endif
diff --git a/man/Makefile.in b/man/Makefile.in
index 135c237..f195f38 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -66,6 +66,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMM = @COMM@
+CONF_INSTALL_FALSE = @CONF_INSTALL_FALSE@
+CONF_INSTALL_TRUE = @CONF_INSTALL_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CVS = @CVS@
@@ -98,6 +100,8 @@ MAILPLUS = @MAILPLUS@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
+MK_LCLSTATEDIR_FALSE = @MK_LCLSTATEDIR_FALSE@
+MK_LCLSTATEDIR_TRUE = @MK_LCLSTATEDIR_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/man/clogin.1 b/man/clogin.1
index 48e53ea..a2e60cd 100644
--- a/man/clogin.1
+++ b/man/clogin.1
@@ -83,8 +83,8 @@ respectively.
reads the
.IR .cloginrc
file for its configuration, then connects and logins into each of the
-routers specified on the command line in the order listed. Some command-line
-options exist to override directives found in the
+routers specified on the command line in the order listed. Command-line
+options exist to override some of the directives found in the
.IR .cloginrc
configuration file.
.PP
@@ -134,8 +134,10 @@ with the connection to the router intact, when it is done. Note that
disables
.IR log_user
of
-.BR expect (1).
-Example script(s) can be found in util/*.exp.
+.BR expect (1) when
+.B \-s
+is used.
+Example script(s) can be found in share/rancid/*.exp.
.\"
.TP
.B \-t
@@ -249,8 +251,8 @@ The HP Procurve switch CLI relies heavily upon curses for cursor/screen
manipulation and assumes a vt100 terminal type. They do not provide a way
to set a different terminal type or adjust this behavior. The resulting
escape codes make automating interaction with these devices very difficult
-or impossible. Thus bin/hpuifilter, which must be found in the PATH, is used
-by hlogin to filter these. While this works for rancid's collection,
+or impossible. Thus bin/hpuifilter, which must be found in the user's PATH,
+is used by hlogin to filter these. While this works for rancid's collection,
there are side effects for interactive logins via hlogin; most of which are
formatting annoyances that may be remedied by typing CTRL-R to reprint the
current line.
diff --git a/man/cloginrc.5 b/man/cloginrc.5
index 36709c2..7bfb7aa 100644
--- a/man/cloginrc.5
+++ b/man/cloginrc.5
@@ -1,8 +1,8 @@
.\"
-.\" $Id: cloginrc.5,v 1.31 2004/01/11 01:53:10 heas Exp $
+.\" $Id: cloginrc.5,v 1.34 2004/03/11 19:37:30 heas Exp $
.\"
.hys 50
-.TH "cloginrc" "5" "11 Jan 2004"
+.TH "cloginrc" "5" "11 Mar 2004"
.SH NAME
\.cloginrc \- clogin configuration file
.SH DESCRIPTION
@@ -42,12 +42,13 @@ include {<file>}
.PP
Note: the braces ({}) surrounding the values is significant when the values
include TCL meta-characters. Best common practice is to always enclose the
-values in braces. If a value includes a (left or right) brace, it must
-be backslash-escaped, as in:
+values in braces. If a value includes a (left or right) brace or space
+character, it must be backslash-escaped, as in:
.PP
.in +1i
.nf
add user <hostname glob> {foo\\}bar}
+add user <hostname glob> {foo\\ bar}
.fi
.in -1i
.PP
@@ -91,7 +92,7 @@ which is automatically enabled. This is, that user has enable privileges
without the need to execute the enable command. The router's prompt is
different for enabled mode, ending with a # rather than a >.
.sp
-Example: add autoenable * 1
+Example: add autoenable * {1}
.sp
Default: 0
.sp
@@ -119,7 +120,7 @@ may be used to adjust the prompt that
should look for when trying to login. Note that enableprompt can be a Tcl
style regular expression.
.sp
-Example: add enableprompt rc*.example.net {"\\[Ee]nter the enable password:"}
+Example: add enableprompt rc*.example.net {"\\[Ee]nter\\ the\\ enable\\ password:"}
.sp
Default: "\\[Pp]assword:"
.\"
@@ -153,7 +154,7 @@ add "mode character" to .telnetrc. See
for more information on telnet command-line syntax, telnet options,
and .telnetrc.
.sp
-Example: add method * {ssh} {telnet:3000} {rsh}
+Example: add method * {ssh} {telnet:-3000} {rsh}
.sp
Which would cause
.IR clogin
@@ -175,6 +176,16 @@ device. This is equivalent to
.BR jlogin (1).
.\"
.TP
+.B add passphrase <router name glob> {"<SSH passphrase>"}
+Specify the SSH passphrase. Note that this may be particular to an
+.B identity
+directive. The passphrase will default to the
+.B password
+for the given router.
+.sp
+Example: add passphrase rc*.example.net {the\\ bird\\ goes\\ tweet}
+.\"
+.TP
.B add passprompt <router name glob> {"<password prompt>"}
When using AAA with a Cisco router or switch, it is possible to redefine the
prompt the device presents to the user for the password. passprompt may be
@@ -183,7 +194,7 @@ used to adjust the prompt that
should look for when trying to login. Note that passprompt can be a Tcl
style regular expression.
.sp
-Example: add passprompt rc*.example.net {"\\[Ee]nter the password:"}
+Example: add passprompt rc*.example.net {"\\[Ee]nter\\ the\\ password:"}
.sp
Default: "(\\[Pp]assword|passwd):"
.\"
@@ -227,7 +238,7 @@ used to adjust the prompt that
should look for when trying to login. Note that userprompt can be a Tcl
style regular expression.
.sp
-Example: add userprompt rc*.example.net {"\\[Ee]nter your username:"}
+Example: add userprompt rc*.example.net {"\\[Ee]nter\\ your\\ username:"}
.sp
Default: "(Username|login|user name):"
.\"
diff --git a/man/control_rancid.1 b/man/control_rancid.1
index f502fb0..225af07 100644
--- a/man/control_rancid.1
+++ b/man/control_rancid.1
@@ -18,8 +18,8 @@ is a
.IR sh (1)
script to parse a group's
.BR router.db (5),
-run rancid for each of the devices, possibly re-run rancid for missed devices,
-e-mail diffs, and e-mail error reports.
+run rancid for each of the devices, possibly re-run rancid for devices
+that failed collection, e-mail diffs, and e-mail error reports.
.\"
.PP
.\"
@@ -45,7 +45,8 @@ with <group name>/<device name> rather than just the group name alone.
.B control_rancid
is normally (and best) run via
.BR rancid-run (1)
-which provides a locking mechanism on a group basis.
+which provides a locking mechanism on a group basis and saves output
+in a log file for each group.
.\"
.SH "SEE ALSO"
.BR rancid-run (1),
diff --git a/man/lg.conf.5.in b/man/lg.conf.5.in
index a2058d1..6e9f86c 100644
--- a/man/lg.conf.5.in
+++ b/man/lg.conf.5.in
@@ -9,7 +9,7 @@ contains configuration for the looking glass scripts.
.PP
The syntax is that of
.IR perl (1).
-It is used to set variables to affect run-time behavior and/or to locate
+It is used to set variables that affect run-time behavior and/or to locate
resources.
.\"
.SH VARIABLES
diff --git a/man/lg_intro.1.in b/man/lg_intro.1.in
index a9a72c4..2ce66e6 100644
--- a/man/lg_intro.1.in
+++ b/man/lg_intro.1.in
@@ -35,8 +35,8 @@ run.
.PP
lg.cgi begins by performing some basic checks on the
arguments passed to it. If these checks pass, lg.cgi either displays
-cached data from a previous invocation if that data exists and is
-within the cache interval or uses
+cached data from a previous invocation, if that data exists and is
+within the cache interval, or uses
.BR clogin (1)
to login to the device and execute the command. The
results of the command are cached if applicable and displayed for the
diff --git a/man/rancid-run.1 b/man/rancid-run.1
index 3e99b26..bbb56a2 100644
--- a/man/rancid-run.1
+++ b/man/rancid-run.1
@@ -71,10 +71,12 @@ may be specified multiple times.
.\"
.TP
.B \-r device_name
-Specify the name, as it appears in a group's router.db, of a particular
-device to collect and generate diffs for. The device must be marked "up".
-If a group is not specified on the command-line, rancid will be run
-against any group in which the device_name appears.
+Run rancid for a single device,
+.IR device_name .
+.IR device_name
+should be name, as it appears in a group's router.db. The device must be
+marked "up". If a group is not specified on the command-line, rancid will
+be run against any group in which the device_name appears.
.sp
The
.B \-r
@@ -88,7 +90,8 @@ utilizes the following environment variables from
.\"
.TP
.B BASEDIR
-Location of group directories, etc.
+Location of group directories, etc. This is set to the "localstatedir"
+by the configure script at installation time.
.\"
.TP
.B LIST_OF_GROUPS
@@ -106,11 +109,11 @@ If rancid fails to run or collect a device's configuration, the particular
group's log file (mentioned above) should be consulted. Any errors produced
by
.BR cvs (1)
-or any of the rancid scripts should be included, whether they be a botched
-cvs tree, login authentication failure, rancid configuration error, etc. If
-the log file produces no clues, the next debugging step should be run the
-commands manually. For example, can the user who runs rancid login to the
-device with 'clogin hostname', and so on.
+or any of the rancid scripts should be included there, whether they be a
+botched cvs tree, login authentication failure, rancid configuration error,
+etc. If the log file produces no clues, the next debugging step should be
+run the commands manually. For example, can the user who runs rancid login
+to the device with 'clogin hostname', and so on.
.BR
.SH FILES
.TP
diff --git a/man/rancid.1 b/man/rancid.1
index 15fca7d..0e7e7ba 100644
--- a/man/rancid.1
+++ b/man/rancid.1
@@ -14,61 +14,83 @@ filename]\ \c
.B rancid
is a
.BR perl (1)
-script which uses
-.BR clogin (1)
-to login to a Cisco router, execute commands to display
-the configuration, etc, then filters the output for formatting, security,
-and so on.
+script which uses the login scripts (see
+.BR clogin (1))
+to login to a device, execute commands to display the configuration, etc,
+then filters the output for formatting, security, and so on.
.B rancid's
product is a file with the name of it's last argument plus the suffix .new.
-For example, hostname.new.
+For example,
+.IR hostname.new .
.PP
-There are complementary scripts for
-Alteon WebOS switches,
-Bay Networks (nortel),
-Cisco catalyst switches,
-Cisco content services switches,
-ADC-kentrox EZ-T3 mux,
-Force10,
-Foundry,
-HP Procurve Switches,
-Hitachi Routers,
-Juniper Networks E-series,
-Juniper Networks,
-MRTd,
-Procket Networks,
-Riverstone,
-Redback,
-Lucent TNT,
-Netscreen firewalls,
-Netscaler,
-Extreme,
-and Zebra routing software
-named
-.B arancid,
-.B brancid,
-.B cat5rancid,
-.B cssrancid,
-.B erancid,
-.B f10rancid,
-.B fnrancid,
-.B francid,
-.B hrancid,
-.B htrancid,
-.B jerancid,
-.B jrancid,
-.B mrancid,
-.B nrancid,
-.B nsrancid,
-.B prancid,
-.B rivrancid,
-.B rrancid,
-.B tntrancid,
-.B nrancid,
-.B xrancid,
-and
-.B zrancid,
-respectively.
+There are complementary scripts for other platforms and/or manufacturers
+that are supported by
+.BR rancid (1).
+Briefly, these are:
+.sp
+.TP 15
+.B arancid
+Alteon WebOS switches
+.TP
+.B brancid
+Bay Networks (nortel)
+.TP
+.B cat5rancid
+Cisco catalyst switches
+.TP
+.B cssrancid
+Cisco content services switches
+.TP
+.B erancid
+ADC-kentrox EZ-T3 mux
+.TP
+.B f10rancid
+Force10
+.TP
+.B fnrancid
+Fortinet Firewalls
+.TP
+.B francid
+Foundry and HP procurve OEMs of Foundry
+.TP
+.B hrancid
+HP Procurve Switches
+.TP
+.B htranicd
+Hitachi Routers
+.TP
+.B jerancid
+Juniper Networks E-series
+.TP
+.B jrancid
+Juniper Networks
+.TP
+.B mrancid
+MRTd
+.TP
+.B prancid
+Procket Networks
+.TP
+.B rivrancid
+Riverstone
+.TP
+.B rrancid
+Redback
+.TP
+.B tntrancid
+Lucent TNT
+.TP
+.B nrancid
+Netscreen firewalls
+.TP
+.B nsrancid
+Netscaler
+.TP
+.B xrancid
+Extreme switches
+.TP
+.B zrancid
+Zebra routing software
.PP
The command-line options are as follows:
.TP
diff --git a/man/rancid.conf.5.in b/man/rancid.conf.5.in
index 75adc87..b8c01e3 100644
--- a/man/rancid.conf.5.in
+++ b/man/rancid.conf.5.in
@@ -1,8 +1,8 @@
.\"
-.\" $Id: rancid.conf.5.in,v 1.9 2004/01/11 06:12:35 hank Exp $
+.\" $Id: rancid.conf.5.in,v 1.11 2004/03/12 23:13:09 heas Exp $
.\"
.hys 50
-.TH "rancid.conf" "5" "7 Jan 2004"
+.TH "rancid.conf" "5" "12 Mar 2004"
.SH NAME
rancid.conf \- rancid environment configuration file
.SH DESCRIPTION
@@ -11,9 +11,9 @@ contains environment configuration information for
.BR rancid-run (1)
and
.BR rancid (1)
-including shell PATH, list of rancid groups, etc. and is read by
-.BR rancid-run (1)
-at run-time.
+including shell PATH, list of rancid groups, etc. and is read by several
+scripts at run-time, including
+.BR rancid-run (1).
.PP
The syntax of
.B rancid.conf
@@ -115,6 +115,14 @@ places log files.
Default: $BASEDIR/logs
.\"
.TP
+.B MAILDOMAIN
+Define the domain part of addresses for administrative and diff e-mail.
+The value of this variable is simply appended to the normal mail addresses.
+For example @MAILPLUS@usfs@example.com, if
+.B MAILDOMAIN
+had been set to "@example.com".
+.\"
+.TP
.B NOCOMMSTR
If set,
.IR rancid (1)
diff --git a/man/rancid_intro.1 b/man/rancid_intro.1
index cf4c571..52d54e6 100644
--- a/man/rancid_intro.1
+++ b/man/rancid_intro.1
@@ -1,5 +1,5 @@
.\"
-.\" $Id: rancid_intro.1,v 1.27 2004/01/11 00:43:19 heas Exp $
+.\" $Id: rancid_intro.1,v 1.28 2004/01/13 21:52:44 heas Exp $
.\"
.hys 50
.TH "rancid_intro" "1" "7 Jan 2004"
@@ -42,8 +42,9 @@ configuration file,
.PP
Lastly, all the updated files are checked into the CVS repository.
.PP
-Additional utilities, including a looking glass, can be found under
-the util sub-directory.
+Additional utilities, including a looking glass, come with rancid. See
+rancid's share directory (
+.IR share/rancid ).
.SH "EXAMPLE E-MAIL"
Below is a sample of a uni-diff produced from the group "shrubbery"
for the device named dfw.shrubbery.net, which happens to be a Cisco GSR.
diff --git a/share/Makefile.in b/share/Makefile.in
index 04c1dd1..55feaba 100644
--- a/share/Makefile.in
+++ b/share/Makefile.in
@@ -69,6 +69,8 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMM = @COMM@
+CONF_INSTALL_FALSE = @CONF_INSTALL_FALSE@
+CONF_INSTALL_TRUE = @CONF_INSTALL_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CVS = @CVS@
@@ -101,6 +103,8 @@ MAILPLUS = @MAILPLUS@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
+MK_LCLSTATEDIR_FALSE = @MK_LCLSTATEDIR_FALSE@
+MK_LCLSTATEDIR_TRUE = @MK_LCLSTATEDIR_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/share/lgnotes.html b/share/lgnotes.html
index 9f28ec3..3f12357 100644
--- a/share/lgnotes.html
+++ b/share/lgnotes.html
@@ -14,8 +14,7 @@ size=+3><strong>&nbsp;&nbsp;&nbsp;Looking Glass Notes
<p>
<ul>
Just a few straight forward notes on our implementation of
-Ed Kern's looking glass. See the original at
-<a href=http://nitrous.digex.net>http://nitrous.digex.net</a>.
+Ed Kern's looking glass (which was http://nitrous.digex.net).
</ul>
</p>
<p>