mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-15 23:50:44 +00:00
43878b4a17
- Correspond to VMware 2.0 Build 476 release (not beta) - Support SMP kernel - Install VMware tools floppies (for Windows and Linux) - Add Hints.FreeBSD - Mention my unofficial `rtc' port on post-install - Raw disk may not work for the present - etc. Enjoy it!
47 lines
783 B
Bash
47 lines
783 B
Bash
#!/bin/sh
|
|
#
|
|
# Start or stop vmware
|
|
#
|
|
# $FreeBSD$
|
|
|
|
vmware_dir=@@PREFIX@@/lib/vmware
|
|
networking=@@NETWORKING@@
|
|
host_ip=@@HOST_IP@@
|
|
netmask=@@NETMASK@@
|
|
|
|
[ -x $vmware_dir/bin/vmware ] || exit
|
|
|
|
if [ `sysctl -n hw.ncpu` -eq 1 ]; then
|
|
suffix=up
|
|
else
|
|
suffix=smp
|
|
fi
|
|
|
|
exec >/dev/null
|
|
|
|
case $1 in
|
|
start)
|
|
kldload ${vmware_dir}/lib/modules/vmmon_${suffix}.ko
|
|
if [ $networking -eq 1 ]; then
|
|
kldload ${vmware_dir}/lib/modules/vmnet.ko
|
|
echo -n >/dev/vmnet1
|
|
ifconfig vmnet1 $host_ip netmask $netmask
|
|
fi
|
|
echo -n " VMware" >/dev/tty
|
|
;;
|
|
|
|
stop)
|
|
kldunload vmmon_${suffix}
|
|
if [ $networking -eq 1 ]; then
|
|
ifconfig vmnet1 down
|
|
ifconfig vmnet1 delete $host_ip
|
|
kldunload vmnet
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
echo "usage: `basename $0` {start|stop}" >&2
|
|
exit 64
|
|
;;
|
|
esac
|