debian/0000755000000000000000000000000012222215423007161 5ustar debian/README.Debian0000644000000000000000000000522611743273153011242 0ustar rancid for Debian ----------------- The main rancid package is divided in two subpackages to separate the core from the cgi looking glass web interface. The user 'rancid' is automatically created. In /etc/rancid you can find rancid.conf and lg.conf (if rancid-cgi is installed) to configure them as you wish. in the example directory of rancid-cgi you can find an example of configuration to add to your apache's conf.d directory to enable the lg cgi view from localhost. ** a note from Colin Whittaker if you find problem on session hanging try setting NOPIPE=YES; export NOPIPE in /etc/rancid/rancid.conf ** A patch is applied to allow logging into a Cisco PIX: (http://www.shrubbery.net/pipermail/rancid-discuss/2005-August/001159.html) ----------------------- schnipp ------------------------------- From: Emre Bastuz Subject: Obtaining Cisco Pix Configs Date: Mon Aug 8 10:02:32 UTC 2005 Hi, some time ago I wrote to this list and asked how RANCID could be used with a Pix firewall and a local user with only "show" privileges. It seems there is no way of doing the following with RANCID: # ssh mypix mypix# login mypix# show running-config etc.... To use "login" instead of "enable" I had to introduce a new variable to .cloginrc and patch the script "clogin". I have included the patch. Please feel free to use it if you need the functionality. Some words about the usage/prerequisites: - you have a pix and want it´s config - you do not want to have the enable password in clear text in your cloginrc - you do not have a tacacs server and want to configure a rancid user on your pix locally You have to: - add a user ("rancid") to your pix, who has the privileges for "show running config", "show flash" and "write term" - add the pix host to your routers.db as type cisco - add the following line/variables to your cloginrc for this host/group/whatever: add user mypix.emre.de rancid add password mypix.emre.de Pass--Word Pass--Word add cyphertype mypix.emre.de des add method mypix.emre.de ssh add login mypix.emre.de {1} The new variable is "login" which will "tell" RANCID to use the "login" command instead of the "enable" command to reach the required privilege level. Please note that using the "login" option implicitly sets "enable" to "no". I´m not a shell-scripting guy, so I hope I didn´t break anything but the patch has worked for me. Any hints/sugestions are welcome. Cheers, Emre ----------------------- schnipp ------------------------------- Samuele Giovanni Tonon Sun Mar 28 15:47:07 CEST 2004 Roland Rosenfeld $Id: README.Debian,v 1.5 2009-02-15 19:35:07 roland Exp $ debian/rancid.config0000644000000000000000000000046611743273153011631 0ustar #!/bin/sh -e . /usr/share/debconf/confmodule db_version 2.0 db_input "critical" "rancid/warning" || true db_go db_input "critical" "rancid/damn_upgrade" || true db_go db_input "critical" "rancid/go_on" || true db_go db_get "critical" "rancid/go_on" || true [ "$RET" = "false" ] && exit 1 db_stop exit 0 debian/rancid.dirs0000644000000000000000000000015211743273153011315 0ustar etc/rancid usr/bin var/lib/rancid usr/lib/rancid/bin var/log/rancid usr/share/man/man1 usr/share/man/man5 debian/rancid.docs0000644000000000000000000000020211743273153011300 0ustar BUGS CHANGES FAQ README Todo UPGRADING BUGS CHANGES FAQ README Todo share/README.misc share/cisco-load.exp share/cisco-reload.exp debian/rancid.examples0000644000000000000000000000002012165050643012160 0ustar cloginrc.sample debian/rancid.links0000644000000000000000000000020711743273153011475 0ustar var/log/rancid var/lib/rancid/logs usr/lib/rancid/bin var/lib/rancid/bin usr/lib/rancid/bin/rancid-run /usr/bin/rancid-run debian/rancid.preinst0000644000000000000000000000043511743273153012044 0ustar #! /bin/sh # preinst script for rancid # # see: dh_installdeb(1) set -e # To remove old bad env link if [ -h /etc/rancid/env ]; then rm /etc/rancid/env fi # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/rancid.templates0000644000000000000000000000125011743273153012352 0ustar Template: rancid/warning Type: note _Description: Note Rancid debian package is still in an alpha stage. If you find problems first check all the docs and then report them as bugs as soon as possible. Currently it doesn't have any installation script to help you configuring it, look at the examples directory under /usr/share/doc/rancid to look for some example for your configuration. Template: rancid/go_on Type: boolean Default: false _Description: Really continue? Please check, whether you made a backup copy of your rancid data. If it's your first installation of rancid accept here, otherwise decline, perform the backup and then run "dpkg-reconfigure rancid" debian/copyright0000644000000000000000000000470311755461063011135 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: RANCID Source: ftp://ftp.shrubbery.net/pub/rancid/ Files: * Copyright: Copyright (c) 1997-2010 by Terrapin Communications, Inc. License: BSD-4-clause All rights reserved. . This code is derived from software contributed to and maintained by Terrapin Communications, Inc. by Henry Kilmer, John Heasley, Andrew Partan, Pete Whiting, Austin Schutz, and Andrew Fort. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Terrapin Communications, Inc. and its contributors for RANCID. 4. Neither the name of Terrapin Communications, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 5. It is requested that non-binding fixes and modifications be contributed back to Terrapin Communications, Inc. . THIS SOFTWARE IS PROVIDED BY Terrapin Communications, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . The expect login scripts were based on Erik Sherk's gwtn, by permission. . The original looking glass software was written by Ed Kern, provided by permission and modified beyond recognition. debian/source/0000755000000000000000000000000011743273164010476 5ustar debian/source/format0000644000000000000000000000001411743273164011704 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211755464327010402 0ustar 9 debian/patches/0000755000000000000000000000000012177736314010630 5ustar debian/patches/09_svn.patch0000644000000000000000000000124611743273164012767 0ustar Author: Nicolas DEFFAYET Description: Avoid "svn: Directory '' is out of date" message. --- a/bin/control_rancid.in +++ b/bin/control_rancid.in @@ -168,6 +168,12 @@ fi fi +# svn update to avoid 'Out of date' error +if [ $RCSSYS = svn ] +then + svn update +fi + # do cvs update of router.db in case anyone has fiddled. $RCSSYS update router.db > $TMP 2>&1 grep "^C" $TMP > /dev/null --- a/bin/rancid-cvs.in +++ b/bin/rancid-cvs.in @@ -131,6 +131,8 @@ svn import -m "$GROUP" . file:///$CVSROOT/$GROUP cd $BASEDIR svn checkout file:///$CVSROOT/$GROUP $GROUP + cd $DIR + svn update fi fi cd $DIR debian/patches/07_nrancid_bs_paging.patch0000644000000000000000000000113211743273166015602 0ustar Author: Vaclav Ovsik Description: Fix "--- more ---" & backspace style paging on netscreen devices. (Closes: #520899) Bug-Debian: http://bugs.debian.org/520899 --- a/bin/nrancid.in +++ b/bin/nrancid.in @@ -173,6 +173,7 @@ while () { tr/\015//d; + 1 while s/[^[:cntrl:]]\cH//g; next if /^\s*$/; last if(/$prompt/); # throw away the pager prompts @@ -213,6 +214,7 @@ print STDERR " In GetConf: $_" if ($debug); while () { tr/\015//d; + 1 while s/[^[:cntrl:]]\cH//g; next if /^\s*$/; next if /^Total Config.+$/i; last if(/$prompt/); debian/patches/16_juniper_temperature.patch0000644000000000000000000000077612101773061016245 0ustar Author: Christian Rohmann Description: Remove the temperature values from juniper configuration, they just create nonsense updates. --- a/bin/jerancid.in +++ b/bin/jerancid.in @@ -247,6 +247,12 @@ ; ; ; next; } + + # we dont want the temperature numbers, they just create nonsense updates + if (/^[\d\/]+\s+[-\w\/\s]+\s+\d+.*/){ + s/(^[\d\/]+\s+[-\w\/\s]+\s+)(\d+)(.*)/$1 -removed- $3/; + } + /^\d+\s+\d+\s+\S+/ && next; # strip nvs usage debian/patches/18_AM_C_PROTOTYPES.patch0000644000000000000000000000062112165047704014522 0ustar Description: Remove AC_C_PROTOTYPES from configure.in since this is no longer supported by current aclocal and breaks autobuild (Closes: #713585). Author: Roland Rosenfeld Bug-Debian: http://bugs.debian.org/713585 --- a/configure.in +++ b/configure.in @@ -35,7 +35,7 @@ # compiler specifics AC_PROG_CC -AM_C_PROTOTYPES +#AM_C_PROTOTYPES AC_PROG_CPP AC_C_CONST AC_C_INLINE debian/patches/01_rancid_par.patch0000644000000000000000000000770612177736314014265 0ustar Author: Roland Rosenfeld Description: Moves par(1) to rancid_par(1), compare #163074 Bugs-Debian: http://bugs.debian.org/163074 --- a/bin/control_rancid.in +++ b/bin/control_rancid.in @@ -126,7 +126,7 @@ MAILHEADERS="Precedence: bulk\n"; export MAILHEADERS fi -# Number of things par should run in parallel. +# Number of things rancid_par should run in parallel. PAR_COUNT=${PAR_COUNT:-5} # Number of times failed collections should be retried. Minimum 1. MAX_ROUNDS=${MAX_ROUNDS:-4} @@ -374,7 +374,7 @@ # tailored to the specific installation. echo "" echo "Trying to get all of the configs." -par -q -n $PAR_COUNT -c "rancid-fe {}" $devlistfile +rancid_par -q -n $PAR_COUNT -c "rancid-fe {}" $devlistfile # This section will generate a list of missed routers # and try to grab them again. It will run through @@ -404,7 +404,7 @@ if [ -f $DIR/routers.up.missed ] ; then echo "=====================================" echo "Getting missed routers: round $round." - par -q -n $PAR_COUNT -c "rancid-fe \{}" $DIR/routers.up.missed + rancid_par -q -n $PAR_COUNT -c "rancid-fe \{}" $DIR/routers.up.missed rm -f $DIR/routers.up.missed round=`expr $round + 1` else --- a/bin/par.in +++ b/bin/par.in @@ -40,9 +40,9 @@ ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ## POSSIBILITY OF SUCH DAMAGE. # -# PAR - parallel processing of command +# RANCID_PAR - parallel processing of command # -# par -q -n # -l logfile -c command -x -d +# rancid_par -q -n # -l logfile -c command -x -d # -q = quiet mode (don't log anything to the logfiles) # -n # = number of processes to run at once (default = 3) # -l logfile = logfile to store par logging into (.0-.n) @@ -56,7 +56,7 @@ # This precludes passing different args to each process. # -e = exec args split by spaces rather than use sh -c # -# par takes a list of items to run a command on. If the list entry begins +# rancid_par takes a list of items to run a command on. If the list entry begins # with a ":" the remainder of the line is the command to run ("{}" will be # replaced with each subsequent item in the list. If the list entry begins # with a "#", the entry is ignored. If a command is defined (either with --- a/man/par.1 +++ b/man/par.1 @@ -1,10 +1,10 @@ .\" .hys 50 -.TH "par" "1" "18 December 2007" +.TH "rancid_par" "1" "18 December 2007" .SH NAME -par \- parallel command processing +rancid_par \- parallel command processing .SH SYNOPSIS -.B par +.B rancid_par [\fB\-dfiqx\fP] [\c .BI \-c\ @@ -18,7 +18,7 @@ file [file...] .SH DESCRIPTION -.B par +.B rancid_par takes a list of files to run a command on. The first line of each file begins with a colon (:) or a pound-sign (#). If a colon, the remainder of the line is a command to run for each of the subsequent lines. If a pound-sign, @@ -43,10 +43,10 @@ c .sp run with -.B par +.B rancid_par like so: .sp - %par -q inputfile + %rancid_par -q inputfile .sp will produce the following output (order will vary): .sp @@ -81,7 +81,7 @@ .TP .B \-l Prefix of logfile name, as in prefix.N where N is the -.B par +.B rancid_par process number ([0..]). .sp Default: par.log.