summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-10-28 10:26:56 -0500
committerGitHub <noreply@github.com>2024-10-28 10:26:56 -0500
commitba18d12f6863505133cde688d5e8188689af63bb (patch)
treec84cd9bcb0fec9fa740dcdef34305f933a383900 /op-mode-definitions
parent5679d68da0a4a356827f314f919b1e281e3cd70e (diff)
parent59c0c0b2e5e0793804785bec0d702b879114a795 (diff)
downloadvyos-1x-ba18d12f6863505133cde688d5e8188689af63bb.tar.gz
vyos-1x-ba18d12f6863505133cde688d5e8188689af63bb.zip
Merge pull request #4172 from natali-rs1985/T6808-current
op_mode: T6808: Console server op mode commands throw errors when console server is not configured
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/show-console-server.xml.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/op-mode-definitions/show-console-server.xml.in b/op-mode-definitions/show-console-server.xml.in
index eae6fd536..03dd97d83 100644
--- a/op-mode-definitions/show-console-server.xml.in
+++ b/op-mode-definitions/show-console-server.xml.in
@@ -21,13 +21,13 @@
<properties>
<help>Examine console ports and configured baud rates</help>
</properties>
- <command>/usr/bin/console -x</command>
+ <command>if cli-shell-api existsActive service console-server; then /usr/bin/console -x; else echo "Console server is not configured"; fi</command>
</leafNode>
<leafNode name="user">
<properties>
<help>Show users on various consoles</help>
</properties>
- <command>/usr/bin/console -u</command>
+ <command>if cli-shell-api existsActive service console-server; then /usr/bin/console -u; else echo "Console server is not configured"; fi</command>
</leafNode>
</children>
</node>