[rancid] Re: [SPAM] - Control rancid had problems parsing my routers.db file - Bayesian Filter detected spam

Chris Gauthier cgauthier at mapscu.com
Tue Sep 2 16:09:36 UTC 2008


I, too, am running 8.04 LTS Server and rancid 2.3.2a7 (I think that is
the right numbers).  Where did you edit the files, Windows or Linux?
That part makes a difference.  Windows, by default, stores using a
<CR-LF>, where Linux (and all *nix variants, as I understand) only
record the <CR>.

 

If you used Windows, check your editor to make sure it is saving in a
Unix-style format (ie, not CR-LF).  (shamless plug) I use EditPad Pro
(they have a Lite version) and love it!

http://www.editpadpro.com/

 

Chris

 

From: rancid-discuss-bounces at shrubbery.net
[mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Johnson, Matt
(GE Healthcare)
Sent: Tuesday, September 02, 2008 8:33 AM
To: rancid-discuss at shrubbery.net
Subject: [SPAM] - [rancid] Control rancid had problems parsing my
routers.db file - Bayesian Filter detected spam

 

Hi everyone.  I'm a new user of rancid.  In setting up my installation,
I was going batty trying to figure out why all the entries in my
router.db file ended up in the routers.down file.  I started monkeying
around in control_rancid and discovered that I needed to add the \r* to
the following lines:

 

perl -F: -ane '{($F[0] =~ tr at A-Z@a-z@,print <mailto:tr at A-Z@a-z@,print>
$_)
    if ($F[2] !~ /^up\r*$/i);}' routers.db > routers.down.new

 

perl -F: -ane '{($F[0] =~ tr at A-Z@a-z@,print <mailto:tr at A-Z@a-z@,print>
"$F[0]:$F[1]\n")
    if ($F[2] =~ /^up\r*$/i);}' routers.db > routers.up.new

 

I have only used vim to edit the router.db file (albiet both on windows
and linux) so didn't expect to have issues with goofy line feeds that
sometimes creep up when using things like windows wordpad.  

 

I post this to the users on the list to see if I'm just doing something
wrong, and also to give this simple fix to anyone else having problems
with their routers ending up in the routers.down file.

 

I'm running perl v5.8.8 on Ubuntu 8.0.4.

 

Thanks everyone.  Its a pretty slick tool once I got it going.

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20080902/04a3c80a/attachment.html 


More information about the Rancid-discuss mailing list