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:23:48 +0200 |
commit | c4cce047d97ffdcaf9279bfffde0b4eaa9976eab (patch) | |
tree | 679300f7954c585afff46426c6fc81ddb247a6f1 | |
parent | 8936791ed1952f6e7a87a085ac19a3857191753b (diff) | |
download | vyos-1x-c4cce047d97ffdcaf9279bfffde0b4eaa9976eab.tar.gz vyos-1x-c4cce047d97ffdcaf9279bfffde0b4eaa9976eab.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.
(cherry picked from commit 224f0b8042f439b8dcc0eb32730da669e8b163af)
-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> |