diff options
author | knu <knu@FreeBSD.org> | 2000-10-02 22:29:06 +0800 |
---|---|---|
committer | knu <knu@FreeBSD.org> | 2000-10-02 22:29:06 +0800 |
commit | 4e3e37f1b2f7564e76f118b9400e203f9822f3c9 (patch) | |
tree | fb17007129d721cfa0401cb853d9002278a32496 | |
parent | 77f097fda0f79b20416c249cfd1e98e4772f1721 (diff) | |
download | freebsd-ports-gnome-4e3e37f1b2f7564e76f118b9400e203f9822f3c9.tar.gz freebsd-ports-gnome-4e3e37f1b2f7564e76f118b9400e203f9822f3c9.tar.zst freebsd-ports-gnome-4e3e37f1b2f7564e76f118b9400e203f9822f3c9.zip |
Complain and stop in case ${LINUXBASE}/dev/vmnet1 is not found.
Submitted by: shimokawa
-rw-r--r-- | emulators/vmware2/files/vmware.sh | 8 | ||||
-rw-r--r-- | emulators/vmware3/files/vmware.sh | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/emulators/vmware2/files/vmware.sh b/emulators/vmware2/files/vmware.sh index 93c8c4e33be8..fe19977b293c 100644 --- a/emulators/vmware2/files/vmware.sh +++ b/emulators/vmware2/files/vmware.sh @@ -8,6 +8,7 @@ vmware_dir=@@PREFIX@@/lib/vmware networking=@@NETWORKING@@ host_ip=@@HOST_IP@@ netmask=@@NETMASK@@ +dev_vmnet1=@@LINUXBASE@@/dev/vmnet1 [ -x $vmware_dir/bin/vmware ] || exit @@ -25,7 +26,12 @@ start) if [ $networking -eq 1 ]; then sysctl net.link.ether.bridge_refresh && bridge="_bridge" kldload if_tap.ko - echo -n >@@LINUXBASE@@/dev/vmnet1 + if [ ! -e $dev_vmnet1 ]; then + echo "$dev_vmnet1 does not exist!" >&2 + echo "Your VMware installation seems broken. Please reinstall VMware port." >&2 + exit 255 + fi + echo -n > $dev_vmnet1 ifconfig vmnet1 $host_ip netmask $netmask if [ _$bridge != _ ]; then sysctl -w net.link.ether.bridge_refresh=1 diff --git a/emulators/vmware3/files/vmware.sh b/emulators/vmware3/files/vmware.sh index 93c8c4e33be8..fe19977b293c 100644 --- a/emulators/vmware3/files/vmware.sh +++ b/emulators/vmware3/files/vmware.sh @@ -8,6 +8,7 @@ vmware_dir=@@PREFIX@@/lib/vmware networking=@@NETWORKING@@ host_ip=@@HOST_IP@@ netmask=@@NETMASK@@ +dev_vmnet1=@@LINUXBASE@@/dev/vmnet1 [ -x $vmware_dir/bin/vmware ] || exit @@ -25,7 +26,12 @@ start) if [ $networking -eq 1 ]; then sysctl net.link.ether.bridge_refresh && bridge="_bridge" kldload if_tap.ko - echo -n >@@LINUXBASE@@/dev/vmnet1 + if [ ! -e $dev_vmnet1 ]; then + echo "$dev_vmnet1 does not exist!" >&2 + echo "Your VMware installation seems broken. Please reinstall VMware port." >&2 + exit 255 + fi + echo -n > $dev_vmnet1 ifconfig vmnet1 $host_ip netmask $netmask if [ _$bridge != _ ]; then sysctl -w net.link.ether.bridge_refresh=1 |