aboutsummaryrefslogtreecommitdiffstats
path: root/config/open-vm-tools_2
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-04-20 19:50:26 -0500
committerChris Buechler <cmb@pfsense.org>2015-04-20 19:50:26 -0500
commite6788003f6d904cb686434c925904a3cb479f571 (patch)
tree57d6dcf07b6913fd7d56067956e23fb7a78710d5 /config/open-vm-tools_2
parent62513c6865aa31a6e5fba8dbb6acfd8dc0a74b3f (diff)
downloadpfsense-packages-e6788003f6d904cb686434c925904a3cb479f571.tar.gz
pfsense-packages-e6788003f6d904cb686434c925904a3cb479f571.tar.bz2
pfsense-packages-e6788003f6d904cb686434c925904a3cb479f571.zip
more open-vm-tools clean up
Diffstat (limited to 'config/open-vm-tools_2')
-rw-r--r--config/open-vm-tools_2/open-vm-tools.inc51
1 files changed, 15 insertions, 36 deletions
diff --git a/config/open-vm-tools_2/open-vm-tools.inc b/config/open-vm-tools_2/open-vm-tools.inc
index 9eee53a2..146d6510 100644
--- a/config/open-vm-tools_2/open-vm-tools.inc
+++ b/config/open-vm-tools_2/open-vm-tools.inc
@@ -2,11 +2,24 @@
function open_vm_tools_deinstall() {
exec("rm /usr/local/etc/rc.d/vmware*");
+ unlink_if_exists("/boot/kernel/vmblock.ko");
+ unlink_if_exists("/boot/kernel/vmhgfs.ko");
+ unlink_if_exists("/boot/kernel/vmmemctl.ko");
+ unlink_if_exists("/boot/kernel/vmxnet.ko");
}
function open_vm_tools_install() {
+ // clean up old .ko files if they exist
+ unlink_if_exists("/boot/kernel/vmblock.ko");
+ unlink_if_exists("/boot/kernel/vmhgfs.ko");
+ unlink_if_exists("/boot/kernel/vmmemctl.ko");
+ unlink_if_exists("/boot/kernel/vmxnet.ko");
+
$openvmtools_path = "/usr/pbi/open-vm-tools-" . php_uname("m");
+
+ exec("cp $openvmtools_path/local/lib/vmware-tools/modules/drivers/vmmemctl /boot/kernel/");
+
$vmware_tools_conf = <<<EOF
[powerops]
poweron-script=
@@ -42,7 +55,7 @@ unset start_cmd
stop_precmd="\${checkvm_cmd}"
unset stop_cmd
command="/usr/local/bin/vmtoolsd"
-command_args="-c {$openvmtools_path}/share/vmware-tools/tools.conf -p /usr/local/lib/open-vm-tools/plugins/vmsvc"
+command_args="-c {$openvmtools_path}/share/vmware-tools/tools.conf -p {$openvmtools_path}/local/lib/open-vm-tools/plugins/vmsvc"
pidfile="/var/run/\${name}.pid"
load_rc_config \$name
@@ -74,17 +87,7 @@ checkvm_cmd="/usr/local/bin/vmware-checkvm > /dev/null"
vmware_guest_vmmemctl_start()
{
echo 'Loading vmmemctl kernel module.'
- kldload /usr/local/lib/vmware-tools/modules/drivers/vmmemctl.ko >/dev/null 2>&1
-}
-vmware_guest_vmblock_start()
-{
- echo 'Loading vmblock kernel module.'
- kldload /usr/local/lib/vmware-tools/modules/drivers/vmblock.ko >/dev/null 2>&1
-}
-vmware_guest_vmhgfs_start()
-{
- echo 'Loading vmhgfs kernel module.'
- kldload /usr/local/lib/vmware-tools/modules/drivers/vmhgfs.ko >/dev/null 2>&1
+ kldload vmmemctl.ko >/dev/null 2>&1
}
# VMware kernel module: vmmemctl
@@ -99,30 +102,6 @@ load_rc_config \$name
vmware_guest_vmmemctl_enable="YES"
run_rc_command "\$1"
-# VMware kernel module: vmblock
-name="vmware_guest_vmblock"
-rcvar="\${name}_enable"
-start_precmd="\${checkvm_cmd}"
-start_cmd="vmware_guest_vmblock_start"
-stop_precmd="\${checkvm_cmd}"
-stop_cmd=":"
-
-load_rc_config \$name
-vmware_guest_vmblock_enable="YES"
-run_rc_command "\$1"
-
-# VMware kernel module: vmhgfs
-name="vmware_guest_vmhgfs"
-rcvar="\${name}_enable"
-start_precmd="\${checkvm_cmd}"
-start_cmd="vmware_guest_vmhgfs_start"
-stop_precmd="\${checkvm_cmd}"
-stop_cmd=":"
-
-load_rc_config \$name
-vmware_guest_vmhgfs_enable="YES"
-run_rc_command "\$1"
-
EOF;
// Write out conf files.