summaryrefslogtreecommitdiffstats
path: root/net/kvm-ifup
diff options
context:
space:
mode:
Diffstat (limited to 'net/kvm-ifup')
-rwxr-xr-xnet/kvm-ifup18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/kvm-ifup b/net/kvm-ifup
new file mode 100755
index 0000000..87e105e
--- /dev/null
+++ b/net/kvm-ifup
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Debian default
+#switch=$(ip route ls | awk '/^default / { for(i=0;i<NF;i++) { if ($(i) == "dev") print $(i+1) }}')
+#/sbin/ifconfig $1 0.0.0.0 up
+#/usr/sbin/brctl addif ${switch} $1
+#exit 0
+
+
+# Configuration with NAT support
+
+. /usr/share/kvm-wrapper/net/kvm-net.conf
+
+echo "$0:"
+echo "Adding $1 to bridge interface $BRIDGE"
+brctl addif "$BRIDGE" "$1"
+ip link set "$1" up
+