Making RANCID more intuitive

Far too often RANCID sends me emails containing diffs that looks something like this:

@@ -2761,9 +2761,9 @@
          unit 0 {
              family ethernet-switching {
                  interface-mode trunk;
                  vlan {
-                     members [ 6 8 304 314 320 ];
+                     members [ 6 8 304 314 320 323 ];
                  }
              }
          }
      }

While the information that a change was made is very helpful, it doesn’t help that the diff by default only shows the four lines above and below the changes to the configuration.

I find that doubling that output from four lines to eight lines puts everything into proper context. To do this, find your control_rancid file on your server. Open up your favorite editor and search for the string “cvs -f diff -u -4” and simply change “-4” to “-8”.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.