summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/XX_vmware.sh
diff options
context:
space:
mode:
authorMichael Janczyk2008-10-17 17:36:10 +0200
committerMichael Janczyk2008-10-17 17:36:10 +0200
commitce17bd2af66a227aab35518a072e49541107a8bf (patch)
treefebd0f86dcbb37307928b222c5a85e91a7605751 /os-plugins/plugins/vmware/XX_vmware.sh
parentSolves the problem of #299. (Greeter=/usr/lib/gdm/gdmgreeter is (diff)
downloadcore-ce17bd2af66a227aab35518a072e49541107a8bf.tar.gz
core-ce17bd2af66a227aab35518a072e49541107a8bf.tar.xz
core-ce17bd2af66a227aab35518a072e49541107a8bf.zip
changed nat config:
now the last octet of the ip confiw lill be omitted. the vmnet dev gets the ip prefix.1 the configs get prefix.2 this way nat seems to work. is this needed for host config as well? git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2358 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware/XX_vmware.sh')
-rw-r--r--os-plugins/plugins/vmware/XX_vmware.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh
index f413f829..2e714cda 100644
--- a/os-plugins/plugins/vmware/XX_vmware.sh
+++ b/os-plugins/plugins/vmware/XX_vmware.sh
@@ -81,6 +81,7 @@ $(ipcalc -m $vmnet1|sed s/.*=//) {" \
>> /mnt/etc/vmware/dhcpd-vmnet1.conf
echo -e "\toption broadcast-address $(ipcalc -b $vmnet1|sed s/.*=//);" \
>> /mnt/etc/vmware/dhcpd-vmnet1.conf
+ # Maybe a different ip is needed s. nat: vmnet="${vmsub}.2"
echo -e "\toption routers $vmip;" \
>> /mnt/etc/vmware/dhcpd-vmnet1.conf
echo -e "}" \
@@ -91,9 +92,13 @@ $(ipcalc -m $vmnet1|sed s/.*=//) {" \
# vmware nat interface configuration
if [ -n "$vmware_vmnet8" ] ; then
cp /mnt/etc/vmware/dhcpd-head.conf /mnt/etc/vmware/dhcpd-vmnet8.conf
- local vmip=${vmware_vmnet8%/*}
+ local vmnet8ip=${vmware_vmnet8%/*}
local vmpx=${vmware_vmnet8#*/}
- local vmsub=$(echo $vmip |sed 's,\(.*\)\..*,\1,') # x.x.x.x => x.x.x">
+ local vmsub=$(echo $vmnet8ip |sed 's,\(.*\)\..*,\1,') # x.x.x.x => x.x.x">
+ # vmip is user for vmnet8 device
+ # vmnet is user for config files nat.conf/dhcp
+ local vmip="${vmsub}.1"
+ local vmnet="${vmsub}.2"
echo -e "vmnet8=$vmip/$vmpx" >> /mnt/etc/vmware/slxvmconfig
echo -e "\n# definition for virtual vmnet8 interface" \
>> /mnt/etc/vmware/dhcpd-vmnet8.conf
@@ -104,7 +109,7 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \
>> /mnt/etc/vmware/dhcpd-vmnet8.conf
echo -e "\toption broadcast-address $(ipcalc -b $vmip/$vmpx|sed s/.*=//);" \
>> /mnt/etc/vmware/dhcpd-vmnet8.conf
- echo -e "\toption routers $vmip;" \
+ echo -e "\toption routers $vmnet;" \
>> /mnt/etc/vmware/dhcpd-vmnet8.conf
echo -e "}" \
>> /mnt/etc/vmware/dhcpd-vmnet8.conf
@@ -112,7 +117,7 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \
> /mnt/etc/vmware/nat.conf
echo -e "[host]" \
>> /mnt/etc/vmware/nat.conf
- echo -e "ip = $vmip/$vmpx" \
+ echo -e "ip = $vmnet/$vmpx" \
>> /mnt/etc/vmware/nat.conf
echo -e "device = /dev/vmnet8" \
>> /mnt/etc/vmware/nat.conf