aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authornsayer <nsayer@FreeBSD.org>2000-12-30 03:10:04 +0800
committernsayer <nsayer@FreeBSD.org>2000-12-30 03:10:04 +0800
commit66ee20b8f1064a589c21b47a6cca43adeb167e55 (patch)
tree89a284028898ce0c1ad06fea087859ffc1261a5d /emulators
parent63ba5c6fec079e5b6657a374e523f16d6c973552 (diff)
downloadfreebsd-ports-gnome-66ee20b8f1064a589c21b47a6cca43adeb167e55.tar.gz
freebsd-ports-gnome-66ee20b8f1064a589c21b47a6cca43adeb167e55.tar.zst
freebsd-ports-gnome-66ee20b8f1064a589c21b47a6cca43adeb167e55.zip
Don't attempt to load modules if they're already in place.
Submitted by: fyr@usenet-edu.net
Diffstat (limited to 'emulators')
-rw-r--r--emulators/vmware2/files/vmware.sh10
-rw-r--r--emulators/vmware3/files/vmware.sh10
2 files changed, 10 insertions, 10 deletions
diff --git a/emulators/vmware2/files/vmware.sh b/emulators/vmware2/files/vmware.sh
index ebd5e68557fa..a5d8029ee831 100644
--- a/emulators/vmware2/files/vmware.sh
+++ b/emulators/vmware2/files/vmware.sh
@@ -45,9 +45,9 @@ exec >/dev/null
case $1 in
start)
- kldload ${vmware_libdir}/modules/vmmon_${suffix}.ko
+ kldstat -v | grep vmmon >/dev/null || kldload ${vmware_libdir}/modules/vmmon_${suffix}.ko
if [ $networking -eq 1 ]; then
- kldload if_tap.ko
+ kldstat -v | grep if_tap >/dev/null || kldload if_tap.ko
if [ ! -e $dev_vmnet1 ]; then
echo "$dev_vmnet1 does not exist!" >&2
echo "Your VMware installation seems broken. Please reinstall VMware port." >&2
@@ -56,9 +56,9 @@ start)
echo -n > $dev_vmnet1
ifconfig vmnet1 $host_ip netmask $netmask
if [ X$bridged = XYES ]; then
- kldload netgraph.ko
- kldload ng_ether.ko
- kldload ng_bridge.ko
+ kldstat -v | grep netgraph >/dev/null || kldload netgraph.ko
+ kldstat -v | grep ng_ether >/dev/null || kldload ng_ether.ko
+ kldstat -v | grep ng_bridge >/dev/null || kldload ng_bridge.ko
ngctl mkpeer vmnet1: bridge lower link0
ngctl name vmnet1:lower vmnet_bridge
ngctl connect vmnet_bridge: ${bridge_interface}: link1 lower
diff --git a/emulators/vmware3/files/vmware.sh b/emulators/vmware3/files/vmware.sh
index ebd5e68557fa..a5d8029ee831 100644
--- a/emulators/vmware3/files/vmware.sh
+++ b/emulators/vmware3/files/vmware.sh
@@ -45,9 +45,9 @@ exec >/dev/null
case $1 in
start)
- kldload ${vmware_libdir}/modules/vmmon_${suffix}.ko
+ kldstat -v | grep vmmon >/dev/null || kldload ${vmware_libdir}/modules/vmmon_${suffix}.ko
if [ $networking -eq 1 ]; then
- kldload if_tap.ko
+ kldstat -v | grep if_tap >/dev/null || kldload if_tap.ko
if [ ! -e $dev_vmnet1 ]; then
echo "$dev_vmnet1 does not exist!" >&2
echo "Your VMware installation seems broken. Please reinstall VMware port." >&2
@@ -56,9 +56,9 @@ start)
echo -n > $dev_vmnet1
ifconfig vmnet1 $host_ip netmask $netmask
if [ X$bridged = XYES ]; then
- kldload netgraph.ko
- kldload ng_ether.ko
- kldload ng_bridge.ko
+ kldstat -v | grep netgraph >/dev/null || kldload netgraph.ko
+ kldstat -v | grep ng_ether >/dev/null || kldload ng_ether.ko
+ kldstat -v | grep ng_bridge >/dev/null || kldload ng_bridge.ko
ngctl mkpeer vmnet1: bridge lower link0
ngctl name vmnet1:lower vmnet_bridge
ngctl connect vmnet_bridge: ${bridge_interface}: link1 lower