openbsd-ports/emulators/qemu/files/qemu-ifdown
sthen e252552d65 - fix multicast virtual networks; setsockopt(SOL_IP, IP_MULTICAST_LOOP)
takes a u_char, not int as in the 0.13.0 qemu code. from mcbride@ with
name change by fgsch@.

- fix copy-and-pasto in the sample qemu-ifdown script resulting in
tun interface not being removed and errors when qemu closes. from me.

ok mcbride@(first part) fgsch@ ajacoutot@ landry@
2011-01-26 13:51:43 +00:00

15 lines
238 B
Bash

#! /bin/sh
_ETHER=trunk0
_BRIDGE=bridge0
# Let the environment over-ride this
[ "$BRIDGE" ] || BRIDGE=${_BRIDGE}
[ "$ETHER" ] || ETHER=${_ETHER}
if test `id -u` -ne 0; then
SUDO=sudo
fi
$SUDO ifconfig $BRIDGE del $1 > /dev/null 2>&1