2017-04-05 11:49:19 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-04-05 12:38:26 +03:00
|
|
|
switch=$(/sbin/ip route show |sed -nre 's/^default .* dev ([^ ]+).*$/\1/;T;p;q')
|
|
|
|
/sbin/ip link set "$1" up promisc on
|
|
|
|
test -d "/sys/class/net/$switch/bridge" && /sbin/ip link set "$1" master "$switch"
|