[rancid] NX-OS and colorized prompts

Piegorsch, Weylin William weylin at bu.edu
Tue Jul 11 20:32:48 UTC 2017


As Chris mentioned, the colorization s disabled by default.  But, the command “term color persist” will add an entry into a per-user .rc file, which is executed upon login and stored in the bootflash: (you can also manually add additional entries into this file via “echo foo >> bootflash:///user.rc”, I make extensive use of that for my login to build the CLI environment I prefer).  Assuming rancid logs in with the credentials of a service account rather than the credentials of a “real” user, this should not be an issue.

As for “what is the utility” – I’ve found this to be highly useful to breakup the output into easily-recognizable blocks, making the output more pleasing to the (er, “my”) eyes while also making it quicker to read.  It’s akin to IDEs that colorize software code.  Though... I seem to be the only one on my team that likes it.

weylin

-----Original Message-----
From: heasley <heas at shrubbery.net>
Date: Tuesday, July 11, 2017 at 11:28
To: "Gauthier, Chris" <cgauthier at comscore.com>
Cc: "rancid-discuss at shrubbery.net" <rancid-discuss at shrubbery.net>
Subject: Re: [rancid] NX-OS and colorized prompts

    Tue, Jul 11, 2017 at 03:11:53PM +0000, Gauthier, Chris:
    > In trying to get my Nexus switches working, I discovered a problem.  The colorized prompts on the Nexus switches use ANSI Escape codes.  This totally trips out rancid and causes it to miss commands.  I verified by turning off the colorization manually that is the issue.  I copied the cisco-nx and renamed it in my rancid.types.conf file and added
    > 
    > cisco-nx5600-9000;command;rancid::RunCommand;no term color
    > 
    > right before the line
    > 
    > cisco-nx5600-9000;command;rancid::RunCommand;term no monitor
    > 
    > Rancid timed out after the “no term color” command executed and changed the prompt.  Suggestions on how to remedy this within rancid?
    
    hold on while i curse for 20 minutes.  seriously cisco, what is the utility
    of this.
    
    can you disable it by default in the config?  Maybe setting a non-color-
    supporting TERM would work?
    
    
    



More information about the Rancid-discuss mailing list