Skip to content

Commit

Permalink
Imported from rancid-2.2b8.tar.gz.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tar Committer committed Oct 16, 2001
1 parent 10cc915 commit b0d7137
Show file tree
Hide file tree
Showing 23 changed files with 1,628 additions and 96 deletions.
20 changes: 20 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2.2b8
add PAR_COUNT variable to bin/env for adjusting the number of
simultaneous collections. see bin/env (or bin/env.new for those with
previous installation) and the env(5) manpage.

more work on extreme switch bits + fixes from Alex Bochannek.

jlogin: add 1s sleeps to avoid passwords being echo'd before tty noecho
is set. richard doty

few looking glass fixes

brancid: filter uptime and add -all option to config for bayrs version
14. from mordechai abzug

jrancid: m160 measured chassis clock MHz fluctuates, trim the
decimal places. from Mark A Gebert.

par: -x fix for log file monitoring killing xterms. from rdrake.

2.2b7
brancid: patch to filter community strings from Mark Cooper

Expand Down
13 changes: 12 additions & 1 deletion FAQ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Frequently Asked Questions about rancid - last updated 20010730
Frequently Asked Questions about rancid - last updated 20010926

1) Platform specific

Expand All @@ -20,6 +20,17 @@ A. The manual page for cvs is quite complete, but can be be overwhelming even
for someone familiar with rcs. There are some excellent resources on the
pages http://www.loria.fr/~molli/cvs-index.html

Q. Errors are showing up in the logs like:
cvs [diff aborted]: there is no version here; run 'cvs checkout' first
A. The directory was not imported into CVS properly or was not properly checked
out afterward, so CVS control files or directories do not exist. create_cvs
should always be used to create the directories and perform the CVS work.
If it is just the directories have been created manually, save a copy of
the router.db file, then remove the group's directory, use create_cvs, and
replace the router.db file. If the CVS import was also performed manually,
cd to <BASEDIR> and use 'cvs co <rancid group>' to create all the CVS
control bits.

Q. I keep receiving the same diff for a (or set of) devices, but I know the
data is not changing repeatedly. Why?
A. This is most likely either a cvs or filesystem permissions problem. Check
Expand Down
20 changes: 15 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,27 @@ control_rancid.in
handles cvs routines.
rancid-fe.in chooses between rancid/[efjr]rancid/cat5rancid.
rancid.in Runs commands on cisco routers and processes the output.
brancid.in Runs commands on baynet/nortel routers and processes the output.
erancid.in Runs commands on ADC EZ-T3 muxes and processes the output.
francid.in Runs commands on foundry switches and processes the output.
hrancid.in Runs commands on hp procurve switches and processes the output.
jrancid.in Runs commands on juniper routers and processes the output.
rrancid.in Runs commands on redback routers and processes the output.
xancid.in Runs commands on extreme switches and processes the output.
cat5rancid.in Runs commands on cisco cat5 switches and processes the output.
blogin.in Expect script that logs into baynet/nortel routers either
interactively, runs a set of commands, or runs another expect
script.
clogin.in Expect script that logs into routers either interactively,
runs a set of commands, or runs another expect script.
elogin.in Expect script that logs into ADC EZ-T3 muxes either
interactively, runs a set of commands, or runs another expect
script.
flogin.in Expect script that logs into foundry switches. Once foundry
cleans up their bloody UI, clogin should do the job.
blogin.in Expect script that logs into hp procurve switches either
interactively, runs a set of commands, or runs another expect
script.
jlogin.in Expect script that logs into juniper routers similarly to
clogin. It is not terribly robust, but mainly used for it's
-c and -s options.
Expand All @@ -43,8 +51,8 @@ The following are included as part of the installation tools:

Makefile.in processed by configure to produce Makefiles
configure GNU autoconf script
install-sh shell script to simulate BSD style install
mkinstalldirs shell script to make installation directories
install-sh GNU autoconf shell script to simulate BSD style install
mkinstalldirs GNU autoconf shell script to make installation directories

rancid will also need to have the following packages:
cvs code revision system available from prep.ai.mit.edu:/pub/gnu
Expand Down Expand Up @@ -118,7 +126,8 @@ Quick Installation Guide (an example):
7) Run create_cvs.
This creates all of the necessary directories and config files for
each of the groups in LIST_OF_GROUPS and imports them into CVS. This
will also be run each time a new group is added. Also see
will also be run each time a new group is added. Do not create the
directories or CVS repository manually, allow create_cvs do it. Also see
'man -M <basedir>/man create_cvs'.

8) For each "group", modify the router.db file in the group directory.
Expand Down Expand Up @@ -185,7 +194,8 @@ Synopsis: SunOS 5.6: /kernel/drv/ip patch

another possibile contributor is expect/tcl. we've noticed that expect
5.24.1 (possibly 5.28.*) and whatever tcl happens to compile with it,
eems to not exhibit this problem, while 5.32.* appears to on linux and
solaris but not on netbsd 1.5.
seems to not exhibit this problem, while 5.32.* appears to on linux and
solaris but not on netbsd 1.5. see www.shrubbery.net/rancid for additional
notes on this.

-Hank
17 changes: 9 additions & 8 deletions Todo
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
- extreme (xrancid)
- collect show switch
- filter ssh host private key
- ??? separate module p/n and s/n or collect from sh ver instead of
show slot?
- rancid should filter pap pwds, as in:
ppp pap sent-username AS3727 password 7 10581C17581043
- extreme collections loses when the config on the switch is in an unsaved
state, probably due to the prompt changing or rather the regex clogin
formulates for the prompt.
- cat4 support?
- 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
filtering routine?
- need par.1 manpage
- need to make sure the following patch was applied to the lookingglass
All routers not listed as 'up' in router.db are considered down.
This allows values other than down to mean 'not up'. for use
by util/downreport.
- a format such as {<user>} as the pwd in .cloginrc to indicate *login should
prompt the user for the password
- handle reback in the looking glass
- handle redback in the looking glass
- implement the bits marked unimplemented in lg.conf
- detect 'same' vty configs
- ignoring length/width/passwd is a start, but need more
Expand Down
5 changes: 3 additions & 2 deletions bin/blogin.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!@EXPECT_PATH@ --
##
##
## Copyright (C) 1997 by Henry Kilmer, Erik Sherk and Pete Whiting.
## Copyright (C) 1997-2001 by Henry Kilmer, Erik Sherk and Pete Whiting.
## All rights reserved.
##
## This software may be freely copied, modified and redistributed without
Expand All @@ -19,7 +19,8 @@
# blogin - Bay Networks(Nortel) login
#
# Unlike the Cisco's, there is no enable function on the Bay's.
# Instead there are seperate User and Manager accounts.
# Instead there are seperate User and Manager accounts. A 'system' command
# exists, which i am told does nothing.
#

# Usage line
Expand Down
12 changes: 8 additions & 4 deletions bin/brancid.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
## hacked version of Hank's rancid - this one tries to deal with Bay's.
##
## Copyright (C) 1997 by Henry Kilmer.
## Copyright (C) 1997-2001 by Henry Kilmer.
## All rights reserved.
##
## This software may be freely copied, modified and redistributed without
Expand Down Expand Up @@ -140,6 +140,8 @@ sub ShowConfig {
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
next if (/^Reading configuration information/);
next if (/^Can\'t find object or class named \"\-all\"\s*$/);
next if (/^\# *uptime +\d+\s*$/);
if (/community label /) {
if (defined($ENV{'NOCOMMSTR'})) {
$_ =~ s/community label .*$/community label <removed>/;
Expand Down Expand Up @@ -178,15 +180,17 @@ sub DoNothing {print STDOUT;}

# Main
%commands=(
'bcc' => "RunCommand",
'show config' => "ShowConfig",
'exit' => "RunCommand"
'bcc' => "RunCommand",
'show config' => "ShowConfig",
'show config -all' => "ShowConfig",
'exit' => "RunCommand"
);
# keys() doesnt return things in the order entered and the order of the
# cmds is important (show version first and write term last). pita
@commands=(
"bcc",
"show config",
"show config -all",
"exit"
);
$cisco_cmds=join(";",@commands);
Expand Down
9 changes: 7 additions & 2 deletions bin/clogin.in
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ proc run_commands { prompt command } {
# If the prompt is (enable), then we are on a switch and the
# command is "set length 0"; otherwise its "term length 0".
# skip if its and extreme.
if { [ string compare "extreme" "$prompt" ] } {
if { [ string compare "extreme" "$platform" ] } {
if [ regexp -- ".*> .*enable" "$prompt" ] {
send "set length 0\r"
} else {
Expand Down Expand Up @@ -501,7 +501,12 @@ proc run_commands { prompt command } {
}
}
log_user 1
send "exit\r"

if { [ string compare "extreme" "$platform" ] } {
send "exit\r"
} else {
send "quit\r"
}
expect {
"Do you wish to save your configuration changes" {
send "n\r"
Expand Down
2 changes: 1 addition & 1 deletion bin/control_rancid.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#

# Number of things par should run in parallel.
PAR_COUNT=5
PAR_COUNT=${PAR_COUNT:-5}

# Must specify a group to run rancid
if [ $# -lt 1 ]; then
Expand Down
6 changes: 5 additions & 1 deletion bin/env.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ CVSROOT=$BASEDIR/CVS; export CVSROOT
#NOCOMMSTR=YES; export NOCOMMSTR
#
# How many hours to go by before complaining about routers that
# can not be reached.
# can not be reached. The value should be greater than the number
# of hours between your do-diffs cron job.
OLDTIME=4; export OLDTIME
#
# The number of devices to collect simultaneously.
#PAR_COUNT=5; export PAR_COUNT
#
# list of rancid groups
LIST_OF_GROUPS="sl joebobisp"
#
Expand Down
Loading

0 comments on commit b0d7137

Please sign in to comment.