summaryrefslogtreecommitdiff
path: root/templates/service/snmp/node.def
diff options
context:
space:
mode:
authorJames Davidson <james.davidson@vyatta.com>2013-02-12 13:02:11 -0800
committerJames Davidson <james.davidson@vyatta.com>2013-02-12 13:02:11 -0800
commit1d917be739f1db7b1ff1d26a0238322d7fd475c5 (patch)
treeac3bdbdcd28f0bd0f9f16477a384e6ccd53970cd /templates/service/snmp/node.def
parent34f23c48bf38c6c88f3c74e958a084bf30380bd6 (diff)
downloadvyatta-cfg-system-1d917be739f1db7b1ff1d26a0238322d7fd475c5.tar.gz
vyatta-cfg-system-1d917be739f1db7b1ff1d26a0238322d7fd475c5.zip
Initial SNMPv3 support
Diffstat (limited to 'templates/service/snmp/node.def')
-rw-r--r--templates/service/snmp/node.def23
1 files changed, 15 insertions, 8 deletions
diff --git a/templates/service/snmp/node.def b/templates/service/snmp/node.def
index 183cc5c3..8047121f 100644
--- a/templates/service/snmp/node.def
+++ b/templates/service/snmp/node.def
@@ -1,13 +1,20 @@
priority: 980
help: Simple Network Management Protocol (SNMP)
-commit:expression: $VAR(community/) != "" || $VAR(community6/) != "" \
- ; "must configure a community or community6"
+commit:expression: $VAR(community/) != "" || $VAR(community6/) != "" || $VAR(v3/) != "" \
+ ; "must configure a community or community6 or v3"
delete: touch /tmp/snmp.$PPID
end:if [ -f "/tmp/snmp.$PPID" ]
- then sudo /opt/vyatta/sbin/vyatta-snmp.pl --stop-snmp
- rm /tmp/snmp.$PPID
- sudo rm -f /etc/snmp/snmpd.conf
- else
- sudo /opt/vyatta/sbin/vyatta-snmp.pl --update-snmp
- fi
+ then
+ sudo /opt/vyatta/sbin/vyatta-snmp.pl --stop-snmp;
+ rm /tmp/snmp.$PPID;
+ sudo rm -f /etc/snmp/snmpd.conf;
+ else
+ sudo /opt/vyatta/sbin/vyatta-snmp.pl --update-snmp;
+ if [ -n "$VAR(v3/)" ]
+ then
+ sudo /opt/vyatta/sbin/vyatta-snmp-v3.pl --update-snmp;
+ else
+ sudo invoke-rc.d snmpd start > /dev/null 2>&1;
+ fi
+ fi