blob: a417f72cef3bbb0749263e5ffe30d765d3e3d0f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
--- ./debian/ifupdown.sh.orig
+++ ./debian/ifupdown.sh
@@ -29,8 +29,8 @@ if (ovs_vsctl --version) > /dev/null 2>&
exit 0
fi
-if /etc/init.d/openvswitch-switch status > /dev/null 2>&1; then :; else
- /etc/init.d/openvswitch-switch start
+if ! /etc/init.d/ovs-vswitchd status &>/dev/null; then
+ /etc/init.d/ovs-vswitchd start
fi
if [ "${MODE}" = "start" ]; then
@@ -38,7 +38,8 @@
${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)
@@ -46,24 +47,24 @@
"${IFACE}" ${IF_OVS_OPTIONS} \
${OVS_EXTRA+-- $OVS_EXTRA}
- ifconfig "${IFACE}" up
+ ip link set dev "${IFACE}" up
;;
OVSIntPort)
ovs_vsctl -- --may-exist add-port "${IF_OVS_BRIDGE}"\
"${IFACE}" ${IF_OVS_OPTIONS} -- set Interface "${IFACE}"\
type=internal ${OVS_EXTRA+-- $OVS_EXTRA}
- ifconfig "${IFACE}" up
+ ip link set dev "${IFACE}" up
;;
OVSBond)
ovs_vsctl -- --fake-iface add-bond "${IF_OVS_BRIDGE}"\
"${IFACE}" ${IF_OVS_BONDS} ${IF_OVS_OPTIONS} \
${OVS_EXTRA+-- $OVS_EXTRA}
- ifconfig "${IFACE}" up
+ ip link set dev "${IFACE}" up
for slave in ${IF_OVS_BONDS}
do
- ifconfig "${slave}" up
+ ip link set dev "${slave}" up
done
;;
OVSTunnel)
@@ -80,7 +81,8 @@
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}"
|