Replace brctl command with ip bridge equivalent
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a6dcf15f3e
commit
0053d6e2b3
1 changed files with 2 additions and 2 deletions
|
|
@ -5,13 +5,13 @@ if [ $(echo "$0" | grep -c up) -eq 1 ]; then
|
|||
done
|
||||
/usr/sbin/ip link set up $1
|
||||
{% if openvpn_bridge_type == "bridge" %}
|
||||
/usr/sbin/brctl addif {{ openvpn_bridge }} $1
|
||||
/usr/sbin/ip link set dev $1 master {{ openvpn_bridge }}
|
||||
{% elif openvpn_bridge_type == "ovs" %}
|
||||
/usr/bin/ovs-vsctl add-port {{ openvpn_bridge }} $1 tag={{ openvpn_vlan }} vlan_mode=native-tagged
|
||||
{% endif %}
|
||||
elif [ $(echo "$0" | grep -c down) -eq 1 ]; then
|
||||
{% if openvpn_bridge_type == "bridge" %}
|
||||
/usr/sbin/brctl delif {{ openvpn_bridge }} $1
|
||||
/usr/sbin/ip link set dev $1 nomaster
|
||||
{% elif openvpn_bridge_type == "ovs" %}
|
||||
/usr/bin/ovs-vsctl del-port {{ openvpn_bridge }} $1
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue