Index: vmware/hotaddbridge
===================================================================
--- vmware/hotaddbridge	(revision 330685ab7e8cb23c6f739667ee06c675622c1524)
+++ vmware/hotaddbridge	(revision 013d01080b5b91d0f7b5f85d22a90619d264c745)
@@ -17,5 +17,5 @@
 read num
 # Check if it exists
-if [ -f /dev/vmnet$num ];then
+if [ -e /dev/vmnet$num ];then
     echo "/dev/vmnet$num exists! Exiting."
     exit 1
@@ -37,6 +37,11 @@
 ret=$?
 if [ $ret != 0 ];then
-    echo "Can't find interface. Exiting!"
-    exit 1
+    if [ "$1" != "-d" ]; then
+        echo "Can't find interface. Exiting!"
+        exit 1
+    else
+        echo "Use dummy device: $interface"
+        dummy="Dummy "
+    fi
 fi
 
@@ -44,5 +49,5 @@
 # Create device
 echo "Creating device /dev/vmnet$num"
-mknod /dev/vmnet$num c 119 $num
+mknod --mode=600 /dev/vmnet$num c 119 $num
 
 # Add to vmware netmap configuration
@@ -52,8 +57,13 @@
 echo "Adding network$nextnetnum to /etc/vmware/netmap.conf"
 
-echo "network$nextnetnum.name=\"$interface\"">> /etc/vmware/netmap.conf
-echo "network$nextnetnum.device=\"vmnet$num\"">> /etc/vmware/netmap.conf
+echo "network$nextnetnum.name = \"${dummy}Bridged to $interface\"">> /etc/vmware/netmap.conf
+echo "network$nextnetnum.device = \"vmnet$num\"">> /etc/vmware/netmap.conf
 
+# Add to vmware locations configuration
+echo "answer VNET_${num}_NAME ${dummy}Bridged to $interface" >> /etc/vmware/locations
+echo "answer VNET_${num}_INTERFACE $interface" >> /etc/vmware/locations
+echo "remove_file /dev/vmnet$num" >> /etc/vmware/locations
+echo "file /dev/vmnet$num" >> /etc/vmware/locations
 
 # Start Service
-vmnet-bridge -d /var/run/vmnet-bridge-$num.pid -n $num -i $interface
+`which vmnet-bridge` -d /var/run/vmnet-bridge-$num.pid -n $num -i $interface
