diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-03-21 08:24:45 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-03-21 08:27:49 +0100 |
commit | 150401fa4c0a393ca496e188eeb08f9ac3844a6a (patch) | |
tree | 70ad3fb56aff00dd4d95246a7b66174de26e23a4 /op-mode-definitions | |
parent | ff6afe62e801e570f6478decf2b4a813a5c0ee94 (diff) | |
download | vyos-1x-150401fa4c0a393ca496e188eeb08f9ac3844a6a.tar.gz vyos-1x-150401fa4c0a393ca496e188eeb08f9ac3844a6a.zip |
ntp: T3416: fix op-mode commands when running inside VRF
When NTP is executed inside a VRF context, we also must execute the op-mode
commands inside the given VRF.
This is a workaround until the op-mode programming library from T3402 is
available.
(cherry picked from commit f411351baef67740b76e800161fe55f495c4bd92)
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/show-ntp.xml.in | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/op-mode-definitions/show-ntp.xml.in b/op-mode-definitions/show-ntp.xml.in index b7f0acdf8..01f4477d8 100644 --- a/op-mode-definitions/show-ntp.xml.in +++ b/op-mode-definitions/show-ntp.xml.in @@ -6,7 +6,7 @@ <properties> <help>Show peer status of NTP daemon</help> </properties> - <command>if ps -C ntpd &>/dev/null; then ntpq -n -c peers; else echo NTP daemon disabled; fi</command> + <command>${vyos_op_scripts_dir}/show_ntp.sh --basic</command> <children> <tagNode name="server"> <properties> @@ -15,15 +15,14 @@ <script>${vyos_completion_dir}/list_ntp_servers.sh</script> </completionHelp> </properties> - <command>/usr/sbin/ntpdate -q "$4"</command> + <command>${vyos_op_scripts_dir}/show_ntp.sh --server "$4"</command> </tagNode> <node name="info"> <properties> <help>Show NTP operational summary</help> </properties> - <command>if ps -C ntpd &>/dev/null; then ntpq -n -c sysinfo; ntpq -n -c kerninfo; else echo NTP daemon disabled; fi</command> - </node> - + <command>${vyos_op_scripts_dir}/show_ntp.sh --info</command> + </node> </children> </node> </children> |