diff options
| author | Date Huang <tjjh89017@hotmail.com> | 2025-07-24 22:13:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-24 15:13:57 +0100 |
| commit | 3882751b89c72f4a7f6808394b6fe12efce7fc01 (patch) | |
| tree | ae9a99d0546554ad7d473f9e6afbeb8b5e03ed5d | |
| parent | a24d129c9fb39ad0d702310019a3ea682bb02395 (diff) | |
| download | vyos-1x-3882751b89c72f4a7f6808394b6fe12efce7fc01.tar.gz vyos-1x-3882751b89c72f4a7f6808394b6fe12efce7fc01.zip | |
T7626: op-mode: fix several op-mode command for syntax (#4603)
* T7626: op-mode: fix several op-mode command for syntax
update container image <container name>
show environment sensors
show log certbot
Signed-off-by: Date Huang <tjjh89017@hotmail.com>
* Update op-mode-definitions/show-log.xml.in
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Signed-off-by: Date Huang <tjjh89017@hotmail.com>
Co-authored-by: Daniil Baturin <daniil@baturin.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| -rw-r--r-- | op-mode-definitions/container.xml.in | 2 | ||||
| -rw-r--r-- | op-mode-definitions/show-environment.xml.in | 2 | ||||
| -rwxr-xr-x | op-mode-definitions/show-log.xml.in | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/op-mode-definitions/container.xml.in b/op-mode-definitions/container.xml.in index 70ab4b6e5..a284bc970 100644 --- a/op-mode-definitions/container.xml.in +++ b/op-mode-definitions/container.xml.in @@ -197,7 +197,7 @@ <path>container name</path> </completionHelp> </properties> - <command>if cli-shell-api existsActive container name "$4"; then podman pull $(cli-shell-api returnActiveValue container name "$4" image); else echo "Container $4 does not exist"; fi</command> + <command>bash -c 'if cli-shell-api existsActive container name "'$4'"; then podman pull $(cli-shell-api returnActiveValue container name "'$4'" image); else echo "Container '$4' does not exist"; fi'</command> </tagNode> </children> </node> diff --git a/op-mode-definitions/show-environment.xml.in b/op-mode-definitions/show-environment.xml.in index 7cc9fe822..74d106ad6 100644 --- a/op-mode-definitions/show-environment.xml.in +++ b/op-mode-definitions/show-environment.xml.in @@ -12,7 +12,7 @@ <help>Show hardware monitoring results</help> </properties> <!-- Linux always adds "hypervisor" to CPU flags --> - <command>if ! grep -q hypervisor /proc/cpuinfo; then ${vyos_op_scripts_dir}/show_sensors.py; else echo "VyOS running under hypervisor, no sensors available"; fi</command> + <command>bash -c 'if ! grep -q hypervisor /proc/cpuinfo; then '${vyos_op_scripts_dir}'/show_sensors.py; else echo "VyOS running under hypervisor, no sensors available"; fi'</command> </leafNode> </children> </node> diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index 499e7f84b..6eb4eb467 100755 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -42,7 +42,7 @@ <properties> <help>Show log for certbot</help> </properties> - <command>if test -f /var/log/letsencrypt/letsencrypt.log; then cat /var/log/letsencrypt/letsencrypt.log; else echo "Cerbot log does not exist"; fi</command> + <command>bash -c 'if test -f /var/log/letsencrypt/letsencrypt.log; then cat /var/log/letsencrypt/letsencrypt.log; else echo "Certbot log does not exist"; fi'</command> </leafNode> <leafNode name="cluster"> <properties> |
