summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/configure-network/files/network-config-suse
blob: 02cdd99878b8ad686d357835388df007a7d316ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

INTERFACE=$1
ACTION=$4

if [[ $INTERFACE == "br-vlan" ]]; then
    if [[ $ACTION == "pre-up" ]]; then
        ip link add br-vlan-veth type veth peer name eth12 || true
        ip link set br-vlan-veth up
        ip link set eth12 up
        brctl addif br-vlan br-vlan-veth
    else
        brctl delif br-vlan br-vlan-veth
        ip link del br-vlan-veth || true
    fi
fi