summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/clear-session.xml.in16
-rw-r--r--op-mode-definitions/connect.xml.in1
-rw-r--r--op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i2
-rw-r--r--op-mode-definitions/monitor-log.xml.in2
-rw-r--r--op-mode-definitions/show-console-server.xml.in2
-rw-r--r--op-mode-definitions/show-interfaces-pppoe.xml.in2
-rw-r--r--op-mode-definitions/show-log.xml.in2
-rw-r--r--op-mode-definitions/show-system.xml.in6
-rw-r--r--op-mode-definitions/vpn-ipsec.xml.in22
9 files changed, 39 insertions, 16 deletions
diff --git a/op-mode-definitions/clear-session.xml.in b/op-mode-definitions/clear-session.xml.in
new file mode 100644
index 000000000..bfafe6312
--- /dev/null
+++ b/op-mode-definitions/clear-session.xml.in
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="clear">
+ <children>
+ <tagNode name="session">
+ <properties>
+ <help>Terminate TTY or PTS user session</help>
+ <completionHelp>
+ <script>who | awk '{print $2}'</script>
+ </completionHelp>
+ </properties>
+ <command>sudo pkill -9 -t $3</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/connect.xml.in b/op-mode-definitions/connect.xml.in
index 8f19eac70..d0c93195c 100644
--- a/op-mode-definitions/connect.xml.in
+++ b/op-mode-definitions/connect.xml.in
@@ -10,6 +10,7 @@
<help>Connect to device attached to serial console server</help>
<completionHelp>
<path>service console-server device</path>
+ <script>${vyos_completion_dir}/list_consoles.sh</script>
</completionHelp>
</properties>
<command>/usr/bin/console "$3"</command>
diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i
index d2804e3b3..7dbc4fde5 100644
--- a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i
+++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i
@@ -153,7 +153,7 @@
<properties>
<help>Show BGP information for specified neighbor</help>
<completionHelp>
- <script>vtysh -c 'show bgp summary' | awk '{print $1'} | grep -e '^[0-9a-f]'</script>
+ <script>vtysh -c "$(IFS=$' '; echo "${COMP_WORDS[@]:0:${#COMP_WORDS[@]}-2} summary")" | awk '/^[0-9a-f]/ {print $1}'</script>
</completionHelp>
</properties>
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in
index 975d20465..01462ad8f 100644
--- a/op-mode-definitions/monitor-log.xml.in
+++ b/op-mode-definitions/monitor-log.xml.in
@@ -237,7 +237,7 @@
</leafNode>
<leafNode name="ipsec">
<properties>
- <help>Monitor last lines of IPSec</help>
+ <help>Monitor last lines of IPsec</help>
</properties>
<command>journalctl --no-hostname --boot --follow --unit strongswan-starter.service</command>
</leafNode>
diff --git a/op-mode-definitions/show-console-server.xml.in b/op-mode-definitions/show-console-server.xml.in
index 253d15498..eae6fd536 100644
--- a/op-mode-definitions/show-console-server.xml.in
+++ b/op-mode-definitions/show-console-server.xml.in
@@ -8,7 +8,7 @@
<properties>
<help>Show log for serial console server</help>
</properties>
- <command>/usr/bin/journalctl --unit conserver-server.service</command>
+ <command>journalctl --no-hostname --boot --follow --unit conserver-server.service</command>
</leafNode>
</children>
</node>
diff --git a/op-mode-definitions/show-interfaces-pppoe.xml.in b/op-mode-definitions/show-interfaces-pppoe.xml.in
index 767836abf..09608bc04 100644
--- a/op-mode-definitions/show-interfaces-pppoe.xml.in
+++ b/op-mode-definitions/show-interfaces-pppoe.xml.in
@@ -17,7 +17,7 @@
<properties>
<help>Show specified PPPoE interface log</help>
</properties>
- <command>/usr/bin/journalctl --unit "ppp@$4".service</command>
+ <command>journalctl --no-hostname --boot --follow --unit "ppp@$4".service</command>
</leafNode>
<leafNode name="statistics">
<properties>
diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in
index ebd198215..8906d9ef3 100644
--- a/op-mode-definitions/show-log.xml.in
+++ b/op-mode-definitions/show-log.xml.in
@@ -384,7 +384,7 @@
</leafNode>
<leafNode name="ipsec">
<properties>
- <help>Show log for IPSec</help>
+ <help>Show log for IPsec</help>
</properties>
<command>journalctl --no-hostname --boot --unit strongswan-starter.service</command>
</leafNode>
diff --git a/op-mode-definitions/show-system.xml.in b/op-mode-definitions/show-system.xml.in
index bd32992aa..4a0e6c3b2 100644
--- a/op-mode-definitions/show-system.xml.in
+++ b/op-mode-definitions/show-system.xml.in
@@ -164,6 +164,12 @@
</properties>
<command>${vyos_op_scripts_dir}/storage.py show</command>
</leafNode>
+ <leafNode name="updates">
+ <properties>
+ <help>Show system available updates</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/system.py show_update</command>
+ </leafNode>
<leafNode name="uptime">
<properties>
<help>Show system uptime and load averages</help>
diff --git a/op-mode-definitions/vpn-ipsec.xml.in b/op-mode-definitions/vpn-ipsec.xml.in
index 8c9e76651..f1af65fcb 100644
--- a/op-mode-definitions/vpn-ipsec.xml.in
+++ b/op-mode-definitions/vpn-ipsec.xml.in
@@ -55,9 +55,9 @@
<children>
<node name="vpn">
<properties>
- <help>Restart IPSec VPN</help>
+ <help>Restart the IPsec VPN process</help>
</properties>
- <command>if pgrep charon >/dev/null ; then sudo ipsec restart ; sleep 3 ; sudo swanctl -q ; else echo "IPSec process not running" ; fi</command>
+ <command>if pgrep charon >/dev/null ; then sudo ipsec restart ; sleep 3 ; sudo swanctl -q ; else echo "IPsec process not running" ; fi</command>
</node>
</children>
</node>
@@ -134,7 +134,7 @@
</node>
<node name="ipsec">
<properties>
- <help>Show Internet Protocol Security (IPSec) information</help>
+ <help>Show Internet Protocol Security (IPsec) information</help>
</properties>
<children>
<node name="policy">
@@ -151,19 +151,19 @@
</leafNode>
<node name="sa">
<properties>
- <help>Show all active IPSec Security Associations (SA)</help>
+ <help>Show all active IPsec Security Associations (SA)</help>
</properties>
<children>
<!--
<node name="detail">
<properties>
- <help>Show Detail on all active IPSec Security Associations (SA)</help>
+ <help>Show Detail on all active IPsec Security Associations (SA)</help>
</properties>
<command></command>
</node>
<tagNode name="stats">
<properties>
- <help>Show statistics for all currently active IPSec Security Associations (SA)</help>
+ <help>Show statistics for all currently active IPsec Security Associations (SA)</help>
<valueHelp>
<format>txt</format>
<description>Show Statistics for SAs associated with a specific peer</description>
@@ -182,12 +182,12 @@
-->
<node name="verbose">
<properties>
- <help>Show Verbose Detail on all active IPSec Security Associations (SA)</help>
+ <help>Show Verbose Detail on all active IPsec Security Associations (SA)</help>
</properties>
- <command>if pgrep charon >/dev/null ; then sudo /usr/sbin/ipsec statusall ; else echo "IPSec process not running" ; fi</command>
+ <command>if pgrep charon >/dev/null ; then sudo /usr/sbin/ipsec statusall ; else echo "IPsec process not running" ; fi</command>
</node>
</children>
- <command>if pgrep charon >/dev/null ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_sa ; else echo "IPSec process not running" ; fi</command>
+ <command>if pgrep charon >/dev/null ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_sa ; else echo "IPsec process not running" ; fi</command>
</node>
<node name="state">
<properties>
@@ -197,9 +197,9 @@
</node>
<node name="status">
<properties>
- <help>Show status of IPSec process</help>
+ <help>Show status of IPsec process</help>
</properties>
- <command>if pgrep charon >/dev/null ; then echo -e "IPSec Process Running: $(pgrep charon)\n$(sudo /usr/sbin/ipsec status)" ; else echo "IPSec process not running" ; fi</command>
+ <command>if pgrep charon >/dev/null ; then echo -e "IPsec Process Running: $(pgrep charon)\n$(sudo /usr/sbin/ipsec status)" ; else echo "IPsec process not running" ; fi</command>
</node>
</children>
</node>