summaryrefslogtreecommitdiffstats
path: root/bin/rrancid.in
diff options
context:
space:
mode:
authorTar Committer <tar@ocjtech.us>2001-02-05 17:47:18 +0000
committerTar Committer <tar@ocjtech.us>2001-02-05 17:47:18 +0000
commitb88919bea4b222a616adbdd2b82fc262a14afc8d (patch)
treea75da71b0e2f905f35d2d7cbfd161df97a3d2c63 /bin/rrancid.in
parent25c2b7c2c8a333b276c3499bcce004137d4b4fe0 (diff)
downloadrancid-b88919bea4b222a616adbdd2b82fc262a14afc8d.tar.gz
rancid-b88919bea4b222a616adbdd2b82fc262a14afc8d.tar.xz
rancid-b88919bea4b222a616adbdd2b82fc262a14afc8d.zip
Imported from rancid-2.1.tar.gz.rancid-2.1
Diffstat (limited to 'bin/rrancid.in')
-rwxr-xr-xbin/rrancid.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/rrancid.in b/bin/rrancid.in
index 9d9b84f..9d40591 100755
--- a/bin/rrancid.in
+++ b/bin/rrancid.in
@@ -212,11 +212,19 @@ sub WriteTerm {
# order access-lists
/^access-list\s+(\d\d?)\s+(\S+)\s+(\S+)/ &&
ProcessHistory("ACL $1 $2","ipsort","$3","$_") && next;
+ # prune snmp community statements
+ if (/^snmp (group|community) (\S+)/) {
+ if (defined($ENV{'NOCOMMSTR'})) {
+ ProcessHistory("SNMPSERVERCOMM","keysort","$_","!snmp $1 <removed>$'") && next;
+ } else {
+ ProcessHistory("SNMPSERVERCOMM","keysort","$_","$_") && next;
+ }
+ }
ProcessHistory("","","","$_");
# end of config
- if (/^end$/) {
- $found_end = 1;
- last;
+ if (/^end$/) {
+ $found_end = 1;
+ last;
}
}
return;
@@ -286,6 +294,7 @@ if ($file) {
}
}
+ProcessHistory("","","","!RANCID-CONTENT-TYPE: redback\n!\n");
ProcessHistory("COMMENTS","keysort","B0","!\n");
ProcessHistory("COMMENTS","keysort","C0","!\n");
ProcessHistory("COMMENTS","keysort","E0","!\n");