From heas at shrubbery.net Mon May 4 20:28:27 2026 From: heas at shrubbery.net (heasley) Date: Mon, 4 May 2026 20:28:27 +0000 Subject: [rancid] [ERROR] lib/rancid/rancid.pm In-Reply-To: References: Message-ID: 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?