The most recent version of debian (and Ubuntu) has
moved towards systemd in a way that many calls to
openvswitch startup scripts get redirected to runtime
generated systemd files.

For e.g commands like 'service openvswitch-switch restart'
or 'invoke-rc.d openvswitch-switch restart' etc will
call 'stop' followed by 'start' on /etc/init.d/openvswitch-switch

'status' commands will not invoke /etc/init.d/openvswitch-switch
at all.

We have some special logic added to
/etc/init.d/openvswitch-switch that is not easily
portable to systemd files.

This commit provides a few hidden commands that when
called will skip the systemd generated files.

Signed-off-by: Gurucharan Shetty <[email protected]>
---
 debian/openvswitch-switch.init | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
index 5c7c08b..b8cc23b 100755
--- a/debian/openvswitch-switch.init
+++ b/debian/openvswitch-switch.init
@@ -124,11 +124,11 @@ case $1 in
     reload | force-reload)
         # The OVS daemons keep up-to-date.
         ;;
-    restart)
+    restart | ovsrestart)
         shift
         restart "$@"
         ;;
-    status)
+    status | ovsstatus)
         ovs_ctl status
         exit $?
         ;;
-- 
1.9.1

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

Reply via email to