[rancid] patch suggestion for Cisco Mobile Express
Bjarne Saltbæk
Bjarne.Saltbaek at sinch.com
Tue Oct 8 11:12:28 UTC 2019
Hi
I am using the 3.9 version for backing up Cisco Mobility Express config on a Cisco Aironet 1830.
I was getting random garbage in the config by using
/etc/rancid/rancid.types.base
cisco-wlc8;script;rancid -t cisco-wlc8
cisco-wlc8;login;wlogin
cisco-wlc8;timeout;120
cisco-wlc8;module;ciscowlc
cisco-wlc8;inloop;ciscowlc::inloop
cisco-wlc8;command;ciscowlc::ShowUdi;show udi
cisco-wlc8;command;ciscowlc::ShowSysinfo;show sysinfo
cisco-wlc8;command;ciscowlc::ShowConfig;show run-config commands
changed ShowConfig from run-config commands to
cisco-wlc8;command;ciscowlc::ShowConfig;show run-config startup-commands
But then ended up with new dates on every diff.
Fixed it by patching wlogin
--- cut ---
--- wlogin.bak 2019-10-08 12:14:31.085325057 +0200
+++ wlogin 2019-10-08 12:58:13.325178327 +0200
@@ -684,6 +684,8 @@
for {set i 0} {$i < $num_commands} { incr i} {
send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
+ -re "^# WLC Config Begin.*\r\n" { exp_continue }
+ -re "^# WLC Config End.*\r\n" { exp_continue }
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
}
--- cut ---
Feel free to add this to the upstream code.
BR,
Bjarne
--
Bjarne Saltbæk
System Administrator
Sinch Denmark
More information about the Rancid-discuss
mailing list