Check for pidfile before attempting 'exit'. If pidfile does
not exist, we cannot cleanly exit so kill process.

Signed-off-by: Mark Gray <[email protected]>
Acked-by: Eelco Chaudron <[email protected]>
---
v2:  Use 'stop_daemon'

 utilities/ovs-ctl.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 8c5cd703274e..39375f4d2ab7 100644
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -254,8 +254,7 @@ stop_forwarding () {
 }
 
 stop_ovs_ipsec () {
-    ${bindir}/ovs-appctl -t ovs-monitor-ipsec exit || return 1
-    return 0
+    stop_daemon ovs-monitor-ipsec
 }
 
 ## --------------- ##
-- 
2.26.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to