5
0
mirror of git://git.proxmox.com/git/pve-qemu.git synced 2024-12-25 01:34:31 +03:00
pve-qemu/debian/kvm-ifup
2017-04-05 11:40:20 +02:00

6 lines
212 B
Bash
Executable File

#!/bin/sh
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"