[rancid] Rancid on juniper netscreens. Read-only and the dreaded ---more- --

Michael Skinner Michael.Skinner at virginmedia.co.uk
Wed May 23 14:49:03 UTC 2007


There seams to be a problem running rancid in the following scenario:

Rancid -> Netscreen firewall -> read-only rancid account on the firewall.

I'm not the only one who has had this issue:
http://www.shrubbery.net/pipermail/rancid-discuss/2006-March/001380.html

Basically the line after the "---more---" is ignored, resulting in a
incomplete device backup.  This isn't a problem if rancid has read-write
access to devices as it can remove the scroll pause.

I have "overcome" this problem by adding the following three lines (and
comment one out) to bin/nrancid:

[...line 183 or so]

sub GetConf {
    print STDERR "    In GetConf: $_" if ($debug);
    while (<INPUT>) {
        tr/\015//d;
+      s/--- more ---//; 	# remove the more
+      s/ \x08//g;		# remove the "whitespace + backspace
characters"
+      s/\x08//g;		# remove the backspace characters
        next if /^\s*$/;
        next if /^Total Config.+$/i;
        last if(/$prompt/);
        # throw away the pager lines
-       #next if /^--- more ---/;

        if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
            ProcessHistory("ADMIN","","","#set admin name <removed>\n");


I'm testing this now on quite a few devices and it seams to be working well.
I'll report issues as they come in.

Thanks

Mike



More information about the Rancid-discuss mailing list