Fri, Aug 24, 2018 at 10:06:54AM +0200, Roland Rosenfeld:
> Hi rancid developers!
> 
> As the maintainer of the Debian package of rancid I received the
> following bug report.
> 
> Tracking down the issue the bug submitter found out, that the issue is
> triggered by power supply mangling code in srancid, which was
> introduced by SVN commit r3741 in rancid 3.8, which seems to stumble
> on the output of the M8024-k switch (see below).
> 
> It would be great, if you could fix this.
> You can find the full conversation about this ticket at
> https://bugs.debian.org/907035

I have none of these devices to test against, so this fix is a guess.
Could you try the patch below?

Index: bin/srancid.in
===================================================================
--- bin/srancid.in      (revision 3853)
+++ bin/srancid.in      (working copy)
@@ -123,6 +123,7 @@
            while (<INPUT>) {
                s/^\s+\015//g;
                tr/\015//d;
+               goto ENDSHOWSYS if(/$prompt/);
                /(\d+)\s+\d+\s+(.*)$/ &&
                ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\n");
                /^\s*$/ && last;
@@ -145,6 +146,7 @@
                /\(celsius\)/i && next;
                s/^\s+\015//g;
                tr/\015//d;
+               goto ENDSHOWSYS if(/$prompt/);
                /(\d+)\s+(\w+)\s+\d+\s+(.*)$/ &&
                ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\t\t$3\n");
                /^\s*$/ && last;
@@ -168,6 +170,7 @@
            while (<INPUT>) {
                s/^\s+\015//g;
                tr/\015//d;
+               goto ENDSHOWSYS if(/$prompt/);
                /^(unit\s|--+\s|\s)/i && next;
                if (/(\d+)\s+(\w+)\s+(\w+(\s\w+)?)\s/) {
                    if (length($2) >= 8) {
@@ -186,6 +189,7 @@
 
        ProcessHistory("COMMENTS","keysort","C1","! $_");
     }
+ENDSHOWSYS:
     return(0);
 }
 

Reply via email to