summaryrefslogtreecommitdiff
path: root/op-mode-definitions/dhcp.xml.in
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions/dhcp.xml.in')
-rw-r--r--op-mode-definitions/dhcp.xml.in20
1 files changed, 10 insertions, 10 deletions
diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in
index 1dacbd5ba..241cca0ce 100644
--- a/op-mode-definitions/dhcp.xml.in
+++ b/op-mode-definitions/dhcp.xml.in
@@ -22,7 +22,7 @@
<properties>
<help>Show DHCP server leases for a specific pool</help>
<completionHelp>
- <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ <path>service dhcp-server shared-network-name</path>
</completionHelp>
</properties>
<command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $6</command>
@@ -57,7 +57,7 @@
<properties>
<help>Show DHCP server statistics for a specific pool</help>
<completionHelp>
- <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ <path>service dhcp-server shared-network-name</path>
</completionHelp>
</properties>
<command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $6</command>
@@ -123,18 +123,18 @@
<children>
<node name="dhcp">
<properties>
- <help>Restart DHCP server processes</help>
+ <help>Restart DHCP processes</help>
</properties>
<children>
<node name="server">
<properties>
- <help>Restart the DHCP server process</help>
+ <help>Restart DHCP server</help>
</properties>
- <command>sudo systemctl restart isc-dhcp-server.service</command>
+ <command>if cli-shell-api existsActive service dhcp-server; then sudo systemctl restart isc-dhcp-server.service; else echo "DHCP server not configured"; fi</command>
</node>
<node name="relay-agent">
<properties>
- <help>Restart the DHCP server process</help>
+ <help>Restart DHCP relay-agent</help>
</properties>
<command>sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv4</command>
</node>
@@ -142,18 +142,18 @@
</node>
<node name="dhcpv6">
<properties>
- <help>Restart DHCPv6 server processes</help>
+ <help>Restart DHCPv6 processes</help>
</properties>
<children>
<node name="server">
<properties>
- <help>Restart the DHCPv6 server process</help>
+ <help>Restart DHCPv6 server</help>
</properties>
- <command>sudo systemctl restart isc-dhcp-server6.service</command>
+ <command>if cli-shell-api existsActive service dhcpv6-server; then sudo systemctl restart isc-dhcp-server6.service; else echo "DHCPv6 server not configured"; fi</command>
</node>
<node name="relay-agent">
<properties>
- <help>Restart the DHCP server process</help>
+ <help>Restart DHCPv6 relay-agent</help>
</properties>
<command>sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv6</command>
</node>