summaryrefslogtreecommitdiff
path: root/op-mode-definitions/restart-snmp.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-15 21:35:06 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-15 21:37:24 +0100
commit9b0906f06f426909f43b97e63ca14261292e7ea2 (patch)
tree8c8d114d8e3728e48df4526cf5308eb11e4ad000 /op-mode-definitions/restart-snmp.xml.in
parent489f6c17244f12b2f2c7d6fb20fe4711ed94780f (diff)
downloadvyos-1x-9b0906f06f426909f43b97e63ca14261292e7ea2.tar.gz
vyos-1x-9b0906f06f426909f43b97e63ca14261292e7ea2.zip
snmp: T652: enable interface_replace_old option and restart command
- Remove all old ifTable entries with the same ifName as newly appeared interface (with different ifIndex) - this is the case on e.g. ppp interfaces - Add new op-mode command "restart snmp" to restart the daemon (cherry picked from commit 79a02470c4f9f2184913a959545b54a2dfd76d1e)
Diffstat (limited to 'op-mode-definitions/restart-snmp.xml.in')
-rw-r--r--op-mode-definitions/restart-snmp.xml.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/op-mode-definitions/restart-snmp.xml.in b/op-mode-definitions/restart-snmp.xml.in
new file mode 100644
index 000000000..7de27df64
--- /dev/null
+++ b/op-mode-definitions/restart-snmp.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="restart">
+ <children>
+ <node name="snmp">
+ <properties>
+ <help>Restart SNMP service</help>
+ </properties>
+ <command>if cli-shell-api existsActive service snmp; then sudo systemctl restart snmpd.service; else echo "Service SNMP not configured"; fi</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>