diff options
-rw-r--r-- | config/open-vm-tools/open-vm-tools.inc | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/config/open-vm-tools/open-vm-tools.inc b/config/open-vm-tools/open-vm-tools.inc index 8ff2cecc..a81489d6 100644 --- a/config/open-vm-tools/open-vm-tools.inc +++ b/config/open-vm-tools/open-vm-tools.inc @@ -9,6 +9,12 @@ function open_vm_tools_install() { $vmware_guestd = <<<EOF #!/bin/sh # +# This file was automatically generated +# by the pfSense package manager. +# +# Do not edit this file. Edit +# /usr/local/pkg/open-vm-tools.inc instead. +# # PROVIDE: vmware-guestd # REQUIRE: DAEMON # BEFORE: LOGIN @@ -39,6 +45,12 @@ EOF; $vmware_kmod = <<<EOF #!/bin/sh # +# This file was automatically generated +# by the pfSense package manager. +# +# Do not edit this file. Edit +# /usr/local/pkg/open-vm-tools.inc instead. +# # PROVIDE: vmware-kmod # REQUIRE: FILESYSTEMS # BEFORE: netif @@ -80,7 +92,6 @@ stop_cmd=":" load_rc_config \$name vmware_guest_vmmemctl_enable="YES" -vmware_guest_vmmemctl_enable="YES" run_rc_command "\$1" # VMware kernel module: vmxnet @@ -121,19 +132,25 @@ run_rc_command "\$1" EOF; + // Write out conf files. $fd = fopen("/usr/local/etc/rc.d/vmware-guestd.sh", "w"); if(!$fd) die("Could not open /usr/local/etc/rc.d/vmware-guestd.sh or writing"); fwrite($fd, $vmware_guestd); fclose($fd); - $fd = fopen("/usr/local/etc/rc.d/vmware-kmod.sh", "w"); if(!$fd) die("Could not open /usr/local/etc/rc.d/vmware-kmod.sh or writing"); fwrite($fd, $vmware_kmod); fclose($fd); + // Remove non used files + unlink_if_exists("/usr/local/etc/rc.d/vmware-kmod"); + unlink_if_exists("/usr/local/etc/rc.d/vmware-guestd"); + + // Make sure files are executable. exec("chmod a+rx /usr/local/etc/rc.d/*.sh"); + } ?>
\ No newline at end of file |