openvswitch: add missing basescript variable
authorStijn Tintel <stijn@linux-ipv6.be>
Wed, 28 Jul 2021 14:48:41 +0000 (17:48 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 29 Jul 2021 09:30:22 +0000 (12:30 +0300)
The Open vSwitch init script does not set USE_PROCD=1. Instead, it
defines most of the functions and variables that would be set when
USE_PROCD is set to 1, but with some minor changes.

The basescript variable however, which is used when calling
procd_open_service and procd_kill, is not set. As a result, basename of
the contents of the initscript variable is used as the service name. As
the service is automatically started via its symlink in /etc/rc.d,
S15openvswitch, the service name is S15openvswitch.

Set the basescript variable so that the service name is openvswitch.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
net/openvswitch/files/openvswitch.init

index 32adbac494e166247f0846cfc133cd5f7f3af545..84ba17b6222824b304b324f90e12d9980f6de1d6 100755 (executable)
@@ -7,6 +7,8 @@
 . /lib/functions/procd.sh
 START=15
 
+basescript=$(readlink "$initscript")
+
 ovs_ctl="/usr/share/openvswitch/scripts/ovs-ctl"; [ -x "$ovs_ctl" ] || ovs_ctl=:
 ovn_ctl="/usr/share/ovn/scripts/ovn-ctl"; [ -x "$ovn_ctl" ] || ovn_ctl=: