summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/qemu-ifdown
diff options
context:
space:
mode:
authorShokara Kou <kou@13f0.net>2023-12-30 15:50:12 -0500
committerShokara Kou <kou@13f0.net>2023-12-30 15:50:19 -0500
commit3fe4845098ca3478fc2d83e6fc943fec4c0459d6 (patch)
treebbc684e930540b942195493a096a283f7e4bf0bf /emulators/qemu/files/qemu-ifdown
parent0f66e5686e2ce39c6821efcf2ead70bfcf4a4a83 (diff)
import qemu from openbsd 7.3 ports
Diffstat (limited to 'emulators/qemu/files/qemu-ifdown')
-rw-r--r--emulators/qemu/files/qemu-ifdown14
1 files changed, 14 insertions, 0 deletions
diff --git a/emulators/qemu/files/qemu-ifdown b/emulators/qemu/files/qemu-ifdown
new file mode 100644
index 0000000..fbd5789
--- /dev/null
+++ b/emulators/qemu/files/qemu-ifdown
@@ -0,0 +1,14 @@
1#! /bin/sh
2
3_ETHER=trunk0
4_BRIDGE=bridge0
5
6# Let the environment over-ride this
7[ "$BRIDGE" ] || BRIDGE=${_BRIDGE}
8[ "$ETHER" ] || ETHER=${_ETHER}
9
10if test `id -u` -ne 0; then
11 DOAS=doas
12fi
13
14$DOAS ifconfig $BRIDGE del $1 > /dev/null 2>&1