aboutsummaryrefslogtreecommitdiffstats
path: root/contrail-agent/scripts/bridges.awk
blob: fc10abdce08c3f2b5f549c777c838230f5e42b39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/^[[:blank:]]*(iface|mapping|auto|allow-[^ ]+|source) / {
    s_iface = 0
}

$1 == "auto" { print $2 >> auto_interfaces; next }

$1 == "iface" {
    s_iface = 1
    iface = $2
    next
}

s_iface == 1 {
    if ($1 == "bridge_ports") {
        for (i = 2; i <= NF; i++) {
            if ($i == interface) {
                print iface >> bridge_interfaces
                break
            }
        }
    }
}