Skip to content
This repository has been archived by the owner on Apr 11, 2019. It is now read-only.

Commit

Permalink
Imported from rancid-2.1.tar.gz.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tar Committer committed Feb 5, 2001
1 parent 25c2b7c commit b88919b
Show file tree
Hide file tree
Showing 48 changed files with 2,353 additions and 557 deletions.
50 changes: 50 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,10 +1,60 @@
2.1
Change default umask to 027 (it was 007) mainly as an
attempt to stop people from changing stuff in rancid's CVS
store. Only rancid should be updating its CVS store.

control_rancid cvs updates router.db before starting a
group's collection.

configure now has a --enable-mail-plus option to have rancid
send mail to rancid+$GROUP instead of to rancd-$GROUP.
Patch from davidw@certaintysolutions.com.

configure should figure out diff options on it's own.

try to get default user from env() and catch exec on id in *login

make clean/distclean was missing some files

make sure do-diffs cleans up after itself if it exits prematurely

ignore case when cvs delete'g removed routers

francid/rrancid (foundry/redback) now strip snmp communities like
the others, via NOCOMMSTR var in bin/env.

add man pages

collect 'sh vlan' on cat 6000 - afort@staff.webcentral.com.au

Add 'show vtp status' for the 3500XLs as well.

Escape regex meta-chars found in device prompts in *rancid

Add "include" directive to include other pwd files via .cloginrc

Add "show port ifindex" for the cat5s.

Try to detect flash being busy on a cat5.

Tag each config file with its 'type'. E.g.:
!RANCID-CONTENT-TYPE: cisco

fix from afort@staff.webcentral.com.au to lg.cgi to allow prefix-list
with numerals.

fix lg form's formatting (on some browsers/conditions). Thanks to
rrashid@verio.net for the html help.

2.1b
add looking glass utility based on Ed Kern's original source. Thanks
to Ed for permission to include it with rancid. this is only partially
tested.

fixed expect foo in *login when .cloginrc is unreadable.

Don't sort 'ip name-server' - order matters.

2.0
Better formatting for cisco catalyst [non-ios] switches.

Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ EXTRA_DIST = CHANGES README Todo cloginrc.sample configure install-sh \

# '.' is here (and at the beginnging of the macro) so that distclean-recursive
# will run make distclean in . after the other dirs (preserving Makefile.inc)
SUBDIRS = . bin util
SUBDIRS = . bin man util

all:

install-exec-local:
$(mkinstalldirs) $(prefix) $(prefix)/bin $(prefix)/util $(prefix)/util/lg
$(mkinstalldirs) $(prefix) $(prefix)/bin $(prefix)/man $(prefix)/util $(prefix)/util/lg

install:
for file in CHANGES README cloginrc.sample ; do \
Expand Down
21 changes: 11 additions & 10 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,34 @@ AUTOMAKE = @AUTOMAKE@
COMM = @COMM@
CVS = @CVS@
DIFF = @DIFF@
DIFF_CMD = @DIFF_CMD@
DIRNAME = @DIRNAME@
ENV_PATH = @ENV_PATH@
EXPECT_PATH = @EXPECT_PATH@
FIND = @FIND@
GREP = @GREP@
ID = @ID@
INST_PROGS = @INST_PROGS@
LG_PING_CMD = @LG_PING_CMD@
MAILPLUS = @MAILPLUS@
MAINT = @MAINT@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR = @MKDIR@
PACKAGE = @PACKAGE@
PERLV = @PERLV@
PERLV_PATH = @PERLV_PATH@
PING_PATH = @PING_PATH@
RD_BIN_DATAS = @RD_BIN_DATAS@
RD_BIN_PROGS = @RD_BIN_PROGS@
RD_UTIL_LG_PROGS = @RD_UTIL_LG_PROGS@
RD_UTIL_PROGS = @RD_UTIL_PROGS@
RSH = @RSH@
SENDMAIL = @SENDMAIL@
SORT = @SORT@
SSH = @SSH@
TAR = @TAR@
TELNET = @TELNET@
TOUCH = @TOUCH@
UCBMAIL = @UCBMAIL@
VERSION = @VERSION@
Expand All @@ -92,7 +101,7 @@ EXTRA_DIST = CHANGES README Todo cloginrc.sample configure install-sh mkinstall

# '.' is here (and at the beginnging of the macro) so that distclean-recursive
# will run make distclean in . after the other dirs (preserving Makefile.inc)
SUBDIRS = . bin util
SUBDIRS = . bin man util
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
Expand Down Expand Up @@ -177,14 +186,6 @@ tags-recursive:

tags: TAGS

ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)

TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
Expand Down Expand Up @@ -344,7 +345,7 @@ mostlyclean distclean maintainer-clean
all:

install-exec-local:
$(mkinstalldirs) $(prefix) $(prefix)/bin $(prefix)/util $(prefix)/util/lg
$(mkinstalldirs) $(prefix) $(prefix)/bin $(prefix)/man $(prefix)/util $(prefix)/util/lg

install:
for file in CHANGES README cloginrc.sample ; do \
Expand Down
112 changes: 68 additions & 44 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,56 @@ maintain CVS controlled copies of router configs.
The following is the packing list for Rancid. .in is stripped from
the files below by configure with substitutions completed:

README - This file.
CHANGES - List of changes to Rancid.
Todo - partial Todo list of what needs to be done.
env.in - Enviromental settings needed.
do-diffs.in - Script designed to be run from cron calling control_rancid.
control_rancid.in - Builds router list, calls rancid on each router and
handles cvs routines.
rancid-fe.in - chooses between rancid/[efjr]rancid/cat5rancid.
rancid.in - Runs commands on cisco routers and processes the output - the meat.
erancid.in - Runs commands on ADC EZ-T3 muxes and processes the output.
francid.in - Runs commands on foundry 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.
cat5rancid.in -Runs commands on cisco cat5 switches and processes the output.
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.
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.
.cloginrc - TCL commands to set passwords, usernames etc. used by clogin and
jlogin.
par.in - Parallel processing of commands - any commands.
rename.in - Perl script to rename files.
create_cvs.in - Creates all of the CVS and config directories.
util/ - utilities / contribs
README This file.
CHANGES List of changes to Rancid.
Todo partial Todo list of what needs to be done.
env.in Environment settings needed.
do-diffs.in Script designed to be run from cron calling control_rancid.
control_rancid.in
Builds router list, calls rancid on each router and
handles cvs routines.
rancid-fe.in chooses between rancid/[efjr]rancid/cat5rancid.
rancid.in Runs commands on cisco 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.
jrancid.in Runs commands on juniper routers and processes the output.
rrancid.in Runs commands on redback routers and processes the output.
cat5rancid.in Runs commands on cisco cat5 switches and processes the output.
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.
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.
.cloginrc TCL commands to set passwords, usernames etc. used by clogin
and jlogin.
par.in Parallel processing of commands - any commands.
rename.in Perl script to rename files.
create_cvs.in Creates all of the CVS and config directories.
man/ man pages
util/ utilities / contribs
util/lg looking glass

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
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

rancid will also need to have the following packages:
cvs - code revision system available from prep.ai.mit.edu:/pub/gnu
gnudiff - gnudiff provides the -u option. if you do not have gnudiff,
you will have to modify control_rancid to use 'diff -c' or some
such. see examples.
perl5 - perl version 5 or greater available from www.cpan.org
expect - http://expect.nist.gov/
tcl - required by expect.
cvs code revision system available from prep.ai.mit.edu:/pub/gnu
gnudiff gnudiff provides the uni-diff (-u) option. if you do not have
gnudiff, configure will use 'diff -c' or 'diff -C'.
perl5 perl version 5 or greater available from www.cpan.org
expect http://expect.nist.gov/ we highly suggest that you stick to
expect 5.24.1 (or so). this seems to work best. note that
you have to have the accompanying tcl &/ tk.
tcl required by expect.

Bill Fenner has a cgi script for interacting with CVS repositories via
a web interface. This provides a great way to view rancid diffs and
Expand All @@ -57,12 +62,17 @@ not included, but can be found here:

http://www.freebsd.org/~fenner/cvsweb/cvsweb-1.0.tar.gz


Quick Installation Guide (an example):

1) ./configure [--prefix=<basedir>]
By default, All rancid crud will be installed under /usr/local/rancid.
This can be overridden with the --prefix option. E.g.:

./configure --prefix=/home/rancid

see ./configure --help for other configure options.

The user who will run rancid must have write permission in this
directory.

Expand All @@ -82,10 +92,10 @@ Quick Installation Guide (an example):
is the default on a juniper).

6) Modify /etc/aliases
Rancid sends the diffs and other controlling emails to rancid-<GROUP>
Rancid sends the diffs and other administrative emails to rancid-<GROUP>
and problems to rancid-admin-<GROUP>, where <GROUP> is the "GROUP" of
routers. This way you can seperate your backbone routers from your
access routers or seperate based upon network etc... Different router
routers. This way you can separate your backbone routers from your
access routers or separate based upon network etc... Different router
uses forced different people being interested in router "groups" -
thus this setup. Make sure email to rancid-<GROUP> works. /etc/aliases
can be maintainable by Majordomo stuff.
Expand All @@ -98,6 +108,10 @@ Quick Installation Guide (an example):
The Precedence header set to bulk or junk *hopefully* avoids replies from
auto-responders and vacation type mail filters.

The --enable-mail-plus option to configure will set each of the "rancid-"
addresses mentioned above to "rancid+". See sendmail's operation manual
for more information on handling of '+'.

7) Run create_cvs.
This creates all of the CVS necessary directories and all of the
config directories.
Expand Down Expand Up @@ -126,7 +140,17 @@ Quick Installation Guide (an example):
# clean out config differ logs
50 23 * * * /usr/bin/find <BASEDIR>/logs -mtime +2 -exec rm {} \;

10) Send any bugs, suggestions or updates to rancid@shrubbery.net.
10) Note: If you are using any of these programs (other than
do-diffs) out of cron, make sure that you set your $PATH
correctly so that they work. E.g.: if you are using clogin,
it can call id, telnet, ssh, and/or rsh.

configure already makes sure that $PATH is set correctly in
bin/env for do-diffs, so you could use the $PATH from there. eg:

50 23 * * * . /usr/local/rancid/bin/env; clogin -c 'sh vers' router

11) Send any bugs, suggestions or updates to rancid@shrubbery.net.
See the web page at http://www.shrubbery.net/rancid. We have
created the standard mailing lists for those interested;
rancid-announce@shrubbery.net and rancid-discuss@shrubbery.net.
Expand Down
25 changes: 7 additions & 18 deletions Todo
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
- a format such as {<user>} as the pwd in .cloginrc to indicate *login should
prompt the user for the password
- better error loggin in the looking glass
- why do 'make distclean' & 'make dist' fail on fbsd 3.3?
- handle foundry and reback in the looking glass
- implement the bits marked unimplemented in lg.conf
- need to strip community strings from foundry, redback
- detect 'same' vty configs
- ignoring length/width/passwd is a start, but need more
- merge clogin and jlogin into one. possible?
- rancid needs to treat the 3600s like the 7Ks and 12Ks...
- Also, need to allow 12012s, and force 700s to not be treated like 7Ks.
Also, need to allow 12012s, and force 700s to not be treated like 7Ks.
- flogin (for foundry) needs more testing and should be integrated with
clogin when foundry fixes their UI.
- check clogin. does it handle multiple addrs for 1 fqdn correctly?
> guelah [444] clogin gw6.partan.com
> gw6.partan.com
> spawn telnet gw6.partan.com
> Trying 198.6.255.57...
> telnet: connect to address 198.6.255.57: Host is unreachable
> telnet: connect to address 198.6.255.61: Host is unreachable
> telnet: connect to address 198.6.255.65: Host is unreachable
> Connected to gw6.partan.com (198.6.255.194).
> Escape character is '^]'.
>
>
> User Access Verification
>
> Username: ^Cguelah [445]
- include a few -s and -x type example *login scripts.
- add -E to *login to pass through variables to scripts
clogin -Evariable=something router...
clogin -Evariable=a,b,c [ie: an array/list which user splits]
6 changes: 4 additions & 2 deletions bin/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ install: all
$(INSTALL) $$prog $(PREFIX)/bin; \
done; \
if test -f $(PREFIX)/bin/env ; then \
echo "WARNING: *** $(PREFIX)/bin/env exists: not installing."; \
echo "WARNING: *** $(PREFIX)/bin/env exists: installing as env.new."; \
echo " *** review env.new for new/deprecated switches"; \
$(INSTALL_DATA) env $(PREFIX)/bin/env.new; \
else \
$(INSTALL_DATA) env $(PREFIX)/bin; \
fi
fi
# BIN_DATAS are empty at the moment.
# for prog in $(BIN_DATAS) ; do \
# $(INSTALL_DATA) $$prog $(PREFIX)/bin; \
Expand Down
Loading

0 comments on commit b88919b

Please sign in to comment.