aports/community/openvswitch/ifupdown-alpine.patch
2025-08-19 02:02:29 +00:00

45 lines
1.6 KiB
Diff

diff --git a/debian/ifupdown.sh b/debian/ifupdown.sh
index b53237e50..e3d05585c 100755
--- a/debian/ifupdown.sh
+++ b/debian/ifupdown.sh
@@ -29,15 +29,10 @@ if (ovs_vsctl --version) > /dev/null 2>&1; then :; else
exit 0
fi
-SERVICE_UNIT=/lib/systemd/system/openvswitch-switch.service
-if [ -f $SERVICE_UNIT ] && [ -x /bin/systemctl ]; then
- if ! systemctl --quiet is-active openvswitch-switch.service; then
- systemctl start openvswitch-switch.service
- fi
-else
- if service openvswitch-switch status > /dev/null 2>&1; then
- service openvswitch-switch start
- fi
+if ! /etc/init.d/ovs-vswitchd status &>/dev/null; then
+ /etc/init.d/ovs-modules start
+ /etc/init.d/ovsdb-server start
+ /etc/init.d/ovs-vswitchd start
fi
if [ "${MODE}" = "start" ]; then
@@ -49,7 +44,8 @@ if [ "${MODE}" = "start" ]; then
${OVS_EXTRA+-- $OVS_EXTRA}
if [ ! -z "${IF_OVS_PORTS}" ]; then
- ifup --allow="${IFACE}" ${IF_OVS_PORTS}
+# ifup --allow="${IFACE}" ${IF_OVS_PORTS}
+ ifup ${IF_OVS_PORTS}
fi
;;
OVSPort)
@@ -97,7 +93,8 @@ elif [ "${MODE}" = "stop" ]; then
case "${IF_OVS_TYPE}" in
OVSBridge)
if [ ! -z "${IF_OVS_PORTS}" ]; then
- ifdown --allow="${IFACE}" ${IF_OVS_PORTS}
+# ifdown --allow="${IFACE}" ${IF_OVS_PORTS}
+ ifdown ${IF_OVS_PORTS}
fi
ovs_vsctl -- --if-exists del-br "${IFACE}"