Whitespace after ":up" in router.db
Alastair Galloway
ag at a.co.nz
Tue Dec 9 10:39:45 UTC 2003
Hi all,
I've just started using RANCID 2.3 EFT (cheers to John for that) along with
a rivlogin from Andrew Fort (based on rscmd, which was based on clogin). I
found that a space after the ":up" in a router.db file resulted in that
device being read as down. Andrew pointed out that the problem was in
bin/control_rancid and that the two instances of the /^up$/ regexp would
need to be replaced with /^up\s*$/ to match "up" and then any amount of
whitespace after it. That's fixed the problem for me, so I'm sharing it
with everyone else here:
[rancid]$ diff bin/control_rancid~ bin/control_rancid
139c139
< if ($F[2] !~ /^up$/i);}' routers.db | sort -u > routers.down.new
---
> if ($F[2] !~ /^up\s*$/i);}' routers.db | sort -u > routers.down.new
143c143
< if ($F[2] =~ /^up$/i);}' routers.db | sort -u > routers.up.new
---
> if ($F[2] =~ /^up\s*$/i);}' routers.db | sort -u > routers.up.new
[rancid]$
Cheers,
Alastair Galloway
More information about the Rancid-discuss
mailing list