diff options
-rw-r--r-- | emulators/vmware2/Makefile | 16 | ||||
-rw-r--r-- | emulators/vmware2/files/vmnet-only+Makefile.patch | 18 | ||||
-rw-r--r-- | emulators/vmware2/files/vmware.sh | 2 | ||||
-rw-r--r-- | emulators/vmware2/pkg-plist | 2 | ||||
-rw-r--r-- | emulators/vmware2/scripts/pre-install | 2 |
5 files changed, 32 insertions, 8 deletions
diff --git a/emulators/vmware2/Makefile b/emulators/vmware2/Makefile index b029925fbb19..77a9c1e40484 100644 --- a/emulators/vmware2/Makefile +++ b/emulators/vmware2/Makefile @@ -67,11 +67,18 @@ BROKEN= "Kernel source files required" .include "${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net" .endif +.if ${OSVERSION} < 500023 +VMNET1_MINOR= 0x00010001 +.else +VMNET1_MINOR= 0x00800001 +.endif + SCRIPTS_ENV+= LINUXBASE="${LINUXBASE}" \ VMNET_HOST_IP="${VMNET_HOST_IP}" \ - VMNET_NETMASK="${VMNET_NETMASK}" + VMNET_NETMASK="${VMNET_NETMASK}" \ + VMNET1_MINOR="${VMNET1_MINOR}" MAKE_ARGS= KMODDIR="${VMDIR}/lib/modules" -PLIST_SUB= LINUXBASE="${LINUXBASE}" +PLIST_SUB= LINUXBASE="${LINUXBASE}" VMNET1_MINOR="${VMNET1_MINOR}" post-extract: .for m in ${MODULES} @@ -125,6 +132,7 @@ post-patch: ${CAT} ${FILESDIR}/hostif_c.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 ${CAT} ${FILESDIR}/vm_types_h.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 .endif + ${CAT} ${FILESDIR}/vmnet-only+Makefile.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 setoptions: ${SED} -e 's;@@PREFIX@@;${PREFIX};' \ @@ -182,10 +190,6 @@ pre-install: setoptions post-install: ${LN} -sf ${PREFIX}/etc/vmware /etc/ -.if ${OSVERSION} >= 500100 - ${RM} -f ${LINUXBASE}/dev/vmnet1 - ${LN} -sf /dev/vmnet1 ${LINUXBASE}/dev/vmnet1 -.endif @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/emulators/vmware2/files/vmnet-only+Makefile.patch b/emulators/vmware2/files/vmnet-only+Makefile.patch new file mode 100644 index 000000000000..066deb2fac00 --- /dev/null +++ b/emulators/vmware2/files/vmnet-only+Makefile.patch @@ -0,0 +1,18 @@ +--- vmnet-only/freebsd/Makefile.orig Sun Apr 13 11:38:03 2003 ++++ vmnet-only/freebsd/Makefile Sun Apr 13 11:38:47 2003 +@@ -63,15 +63,5 @@ + echo -n >/dev/${IFACE} + -ifconfig ${IFACE} inet ${IFADDR} netmask 255.255.255.0 + +-afterinstall: device +- +-device: +- rm -f /dev/${DEVNAME}* +- ln -s /dev/${DEVNAME}0 /dev/${DEVNAME} +- for d in ${NDEVICES}; do \ +- mknod /dev/${DEVNAME}$$d c ${CDEV_MAJOR} `expr 65536 + $$d`; \ +- done +- +- + .include <bsd.kmod.mk> + diff --git a/emulators/vmware2/files/vmware.sh b/emulators/vmware2/files/vmware.sh index 2f2d1f00d674..c9f77fbb313d 100644 --- a/emulators/vmware2/files/vmware.sh +++ b/emulators/vmware2/files/vmware.sh @@ -53,6 +53,8 @@ start) echo "Your VMware installation seems broken. Please reinstall VMware port." >&2 exit 255 fi + (echo -n > $dev_vmnet1) 2>/dev/null || \ + echo -n > /dev/vmnet1 2>&1 echo -n > /dev/vmnet1 2>&1 || true echo -n > $dev_vmnet1 2>&1 ifconfig vmnet1 $host_ip netmask $netmask diff --git a/emulators/vmware2/pkg-plist b/emulators/vmware2/pkg-plist index 9a7ccbebb54f..c46cb1600a21 100644 --- a/emulators/vmware2/pkg-plist +++ b/emulators/vmware2/pkg-plist @@ -122,7 +122,7 @@ share/doc/vmware/SAMBA-LICENSE @exec mknod %%LINUXBASE%%/dev/hdb b 0 0x0001000a @exec ln -sf %D/etc/vmware /etc/ @exec mknod %%LINUXBASE%%/dev/vmmon c 200 0 -@exec mknod %%LINUXBASE%%/dev/vmnet1 c 149 65537 +@exec mknod %%LINUXBASE%%/dev/vmnet1 c 149 %%VMNET1_MINOR%% @unexec rm -f /etc/vmware %%LINUXBASE%%/dev/vmmon %%LINUXBASE%%/dev/vmnet1 %%LINUXBASE%%/bin/df %%LINUXBASE%%/dev/tty[0-9]* %%LINUXBASE%%/dev/hd? %%LINUXBASE%%/dev/null @dirrm etc/vmware @dirrm lib/vmware/bin diff --git a/emulators/vmware2/scripts/pre-install b/emulators/vmware2/scripts/pre-install index 3b6a1f8eb30c..29261ccebb9d 100644 --- a/emulators/vmware2/scripts/pre-install +++ b/emulators/vmware2/scripts/pre-install @@ -18,7 +18,7 @@ ln -s ${linux_dev}/tty1 ${linux_dev}/tty0 mknod ${linux_dev}/null c 2 2 chmod 666 ${linux_dev}/null echo Creating vmnet1 node -mknod /compat/linux/dev/vmnet1 c 149 65537 +mknod /compat/linux/dev/vmnet1 c 149 ${VMNET1_MINOR} echo Creating $linux_dev/hd\? mknod ${linux_dev}/hda b 0 0x00010002 mknod ${linux_dev}/hdb b 0 0x0001000a |