Package: open-vm-tools
Version: 2:10.3.10-2

Currently, when "shared folders" is enabled in VMware Workstation or Fusion 
while the VM is running, the mount point will be created and mounted. This 
works by sending an RPC from WS / Fusion to vmtoolsd in the VM. But this does 
not persist on a reboot, and does not happen when the VM is powered off. 
Attached is a patch for the debian files that adds a systemd mount file that 
mounts /mnt/hgfs with the same options that are used by vmtoolsd to mount the 
shared folders. It also moves the loading of the fuse module to the base 
package since vmhgfs uses fuse.

Thanks,
Oliver


diff --git a/debian/local/mnt-hgfs.mount b/debian/local/mnt-hgfs.mount
new file mode 100644
index 00000000..405cfd41
--- /dev/null
+++ b/debian/local/mnt-hgfs.mount
@@ -0,0 +1,16 @@
+[Unit]
+Description=VMware mount for hgfs
+DefaultDependencies=no
+Before=umount.target
+ConditionVirtualization=vmware
+After=sys-fs-fuse-connections.mount
+
+[Mount]
+What=vmhgfs-fuse
+Where=/mnt/hgfs
+Type=fuse
+Options=nodev,nosuid,allow_other
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/debian/local/open-vm-tools-desktop.conf b/debian/local/open-vm-tools-desktop.conf
index a3b234c2..0833e325 100644
--- a/debian/local/open-vm-tools-desktop.conf
+++ b/debian/local/open-vm-tools-desktop.conf
@@ -1,2 +1 @@
-fuse
 vmwgfx
diff --git a/debian/local/open-vm-tools.conf b/debian/local/open-vm-tools.conf
new file mode 100644
index 00000000..a517c488
--- /dev/null
+++ b/debian/local/open-vm-tools.conf
@@ -0,0 +1 @@
+fuse
diff --git a/debian/rules b/debian/rules
index 62a68cef..a64e41e3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,6 +39,9 @@ override_dh_auto_install:
 	install -D -m 0644 debian/local/xautostart.conf debian/open-vm-tools-desktop/etc/vmware-tools/xautostart.conf
 	install -D -m 0644 debian/local/tools.conf debian/open-vm-tools/etc/vmware-tools/tools.conf
 
+	install -D -m 0644 debian/local/mnt-hgfs.mount debian/open-vm-tools/lib/systemd/system/mnt-hgfs.mount
+	install -D -m 0644 debian/local/open-vm-tools.conf debian/open-vm-tools/usr/lib/modules-load.d/open-vm-tools.conf
+
 	install -D -m 0644 debian/local/run-vmblock\\x2dfuse.mount debian/open-vm-tools-desktop/lib/systemd/system/run-vmblock\\x2dfuse.mount
 	install -D -m 0644 debian/local/open-vm-tools-desktop.conf debian/open-vm-tools-desktop/usr/lib/modules-load.d/open-vm-tools-desktop.conf
 
@@ -99,6 +102,7 @@ override_dh_fixperms:
 override_dh_installsystemd:
 	dh_installsystemd -popen-vm-tools
 	dh_installsystemd -popen-vm-tools --name vgauth
+	dh_installsystemd -popen-vm-tools mnt-hgfs.mount
 	dh_installsystemd -popen-vm-tools-desktop --restart-after-upgrade --no-stop-on-upgrade run-vmblock\\x2dfuse.mount
 
 override_dh_installchangelogs:

Reply via email to