[ovs-dev] [PATCH v2 2/4] ovs-ctl: Check for ovs-monitor-ipsec pidfile before exit

Mark Gray mark.d.gray at redhat.com
Thu Dec 24 09:38:56 UTC 2020


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

Signed-off-by: Mark Gray <mark.d.gray at redhat.com>
Acked-by: Eelco Chaudron <echaudro at redhat.com>
---
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



More information about the dev mailing list