diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-19 09:21:25 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-19 09:21:25 +0200 |
commit | 224f0b8042f439b8dcc0eb32730da669e8b163af (patch) | |
tree | 0cdadb38f64ea51b03ca5b25f7decd72ee42d0a0 | |
parent | 5d4c75d7fdecc56a8864a3ef76ead3f6121a0cff (diff) | |
download | vyos-1x-224f0b8042f439b8dcc0eb32730da669e8b163af.tar.gz vyos-1x-224f0b8042f439b8dcc0eb32730da669e8b163af.zip |
dhcpv6: op-mode: xml: error out if DHCPv6 service not configured
Restarting DHCPv6 server should not be possible when service is not configured
on the CLI.
-rw-r--r-- | op-mode-definitions/dhcp.xml.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in index 7f4bdb990..241cca0ce 100644 --- a/op-mode-definitions/dhcp.xml.in +++ b/op-mode-definitions/dhcp.xml.in @@ -149,7 +149,7 @@ <properties> <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> |