- Timestamp:
- Jun 26, 2010 9:47:00 AM (14 years ago)
- Branches:
- master, trunk
- Children:
- c78c702
- Parents:
- 330685a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vmware/hotaddbridge
r330685a r013d010 17 17 read num 18 18 # Check if it exists 19 if [ - f/dev/vmnet$num ];then19 if [ -e /dev/vmnet$num ];then 20 20 echo "/dev/vmnet$num exists! Exiting." 21 21 exit 1 … … 37 37 ret=$? 38 38 if [ $ret != 0 ];then 39 echo "Can't find interface. Exiting!" 40 exit 1 39 if [ "$1" != "-d" ]; then 40 echo "Can't find interface. Exiting!" 41 exit 1 42 else 43 echo "Use dummy device: $interface" 44 dummy="Dummy " 45 fi 41 46 fi 42 47 … … 44 49 # Create device 45 50 echo "Creating device /dev/vmnet$num" 46 mknod /dev/vmnet$num c 119 $num51 mknod --mode=600 /dev/vmnet$num c 119 $num 47 52 48 53 # Add to vmware netmap configuration … … 52 57 echo "Adding network$nextnetnum to /etc/vmware/netmap.conf" 53 58 54 echo "network$nextnetnum.name =\"$interface\"">> /etc/vmware/netmap.conf55 echo "network$nextnetnum.device =\"vmnet$num\"">> /etc/vmware/netmap.conf59 echo "network$nextnetnum.name = \"${dummy}Bridged to $interface\"">> /etc/vmware/netmap.conf 60 echo "network$nextnetnum.device = \"vmnet$num\"">> /etc/vmware/netmap.conf 56 61 62 # Add to vmware locations configuration 63 echo "answer VNET_${num}_NAME ${dummy}Bridged to $interface" >> /etc/vmware/locations 64 echo "answer VNET_${num}_INTERFACE $interface" >> /etc/vmware/locations 65 echo "remove_file /dev/vmnet$num" >> /etc/vmware/locations 66 echo "file /dev/vmnet$num" >> /etc/vmware/locations 57 67 58 68 # Start Service 59 vmnet-bridge-d /var/run/vmnet-bridge-$num.pid -n $num -i $interface69 `which vmnet-bridge` -d /var/run/vmnet-bridge-$num.pid -n $num -i $interface
Note: See TracChangeset
for help on using the changeset viewer.