[rancid] [ERROR] lib/rancid/rancid.pm
heasley
heas at shrubbery.net
Mon May 4 20:28:27 UTC 2026
Wed, Apr 22, 2026 at 12:13:22PM +0000, Pan Affa:
> Dear Haussli,
>
> I have a situation about that when rancid fetch Cisco device's configuration if the last command 'write term' occurs error. The script 'rancid' will not keep the xxx.new file. After I debuged it, I found the codes in the lib/rancid/rancid.pm will result in the 'rancid' script doesn't show the error message (the missing cmd: xxx).
>
> # Use an array to preserve the order of the commands and a hash for mapping
> # commands to the subroutine and track commands that have been completed.
> @commands = map(keys(%$_), @commandtable);
> %commands = map(%$_, @commandtable);
> $commandcnt = scalar(keys(%commands));
that implies to me that it did see the command (match it), but the filter
function exited with non-zero before it finished consuming the input.
Does that match your debugging? Perhaps you can share an example with me
directly?
More information about the Rancid-discuss
mailing list