From c4cce047d97ffdcaf9279bfffde0b4eaa9976eab Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 19 Sep 2021 09:21:25 +0200 Subject: 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) --- op-mode-definitions/dhcp.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'op-mode-definitions') 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 @@ Restart DHCPv6 server - sudo systemctl restart isc-dhcp-server6.service + if cli-shell-api existsActive service dhcpv6-server; then sudo systemctl restart isc-dhcp-server6.service; else echo "DHCPv6 server not configured"; fi -- cgit v1.2.3