run lxc-enter-namespace with --noseclabel
[tests.git] / system / template-qemu / qemu-ifup
index b14f2f3..c929270 100755 (executable)
@@ -1,19 +1,10 @@
 #!/bin/bash
 
-# Mise en place d'un environnement d'exécution d'une machine
-# virtuelle sous QEMU pour partage de la connexion réseau
-# avec une une machine hôte sous FC6.
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA 
+#
+# this is the script provided to the qemu command-line, that qemu invokes to init the net device
+# basically this adds the interface to the bridge
 
-INTERFACE_LAN=eth0
-INTERFACE_BRIDGE=br0
-
-echo "Configure $1 interface..."
-echo "Activating link for $1..."
-/sbin/ip link set $1 up
-sleep 1
-echo "Configure $INTERFACE_BRIDGE bridge..."
-/usr/sbin/brctl addif $INTERFACE_BRIDGE $1
-echo "Activating promiscuous mode on $1 ..."
-/sbin/ifconfig $1 0.0.0.0 promisc up
-sleep 1
-echo "Done."
+cd $(dirname $0)
+exec ./qemu-bridge-init add $1