[ovs-dev,1/2] openvswitch-switch.init: Add some aliases.
diff mbox

Message ID 1497870359-24320-1-git-send-email-guru@ovn.org
State Deferred
Headers show

Commit Message

Gurucharan Shetty June 19, 2017, 11:05 a.m. UTC
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 <guru@ovn.org>
---
 debian/openvswitch-switch.init | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox

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 $?
         ;;