reviewed list options parsing
[tests.git] / system / template-qemu / qemu-bridge-init
index a3e89b4..cf21f81 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA 
+#
 # Establishment of a runtime environment for a
 # virtual  machine  under QEMU, This script allows the host box
 # to share its network connection with qemu-based guests
@@ -25,6 +28,7 @@ start () {
     hostname
     uname -a
     ifconfig
+    netstat -rn
     echo "========== $COMMAND: entering start - end"
 
     # take extra arg for ifname, if provided
@@ -58,9 +62,9 @@ start () {
     echo "Starting udev ..."
     /sbin/udevd restart
     if modprobe kqemu &> /dev/null ; then
-       echo "kqemu loadded"
+       echo "(bridge-init) kqemu loaded"
     else
-       echo "WARNING : Could not modprobe kqemu"
+       echo "(bridge-init) WARNING : Could not modprobe kqemu"
     fi
     #Loading the tun/tap model
     if modprobe tun ; then
@@ -92,6 +96,7 @@ start () {
 
     echo "========== $COMMAND: exiting start - beg"
     ifconfig
+    netstat -rn
     echo "========== $COMMAND: exiting start - end"
 }
 
@@ -103,6 +108,7 @@ add () {
 
     echo "========== $COMMAND: entering add - beg"
     ifconfig
+    netstat -rn
     echo "========== $COMMAND: entering add - end"
 
     echo "Activating link for $INTERFACE_LAN..."
@@ -127,6 +133,7 @@ add () {
     echo "========== $COMMAND: exiting add - beg"
 
     ifconfig
+    netstat -rn
 
     echo "Installed iptables"
     iptables-save