forked from rpms/open-vm-tools
Setup and teardown Shared Folders mount point
This commit is contained in:
parent
a1cb94a1c0
commit
fcd2fa293b
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
Name: open-vm-tools
|
Name: open-vm-tools
|
||||||
Version: %{toolsversion}
|
Version: %{toolsversion}
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Open Virtual Machine Tools for virtual machines hosted on VMware
|
Summary: Open Virtual Machine Tools for virtual machines hosted on VMware
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -171,11 +171,19 @@ install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/%{vgauthdaemon}.service
|
|||||||
# upstream
|
# upstream
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ -e %{_bindir}/vmware-guestproxycerttool ]; then
|
if [ -f %{_bindir}/vmware-guestproxycerttool ]; then
|
||||||
mkdir -p %{_sysconfdir}/vmware-tools/GuestProxyData/server
|
mkdir -p %{_sysconfdir}/vmware-tools/GuestProxyData/server
|
||||||
mkdir -p -m 0700 %{_sysconfdir}/vmware-tools/GuestProxyData/trusted
|
mkdir -p -m 0700 %{_sysconfdir}/vmware-tools/GuestProxyData/trusted
|
||||||
%{_bindir}/vmware-guestproxycerttool -g &> /dev/null || /bin/true
|
%{_bindir}/vmware-guestproxycerttool -g &> /dev/null || /bin/true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Setup mount point for Shared Folders
|
||||||
|
if [ -f %{_bindir}/vmware-checkvm ] && \
|
||||||
|
%{_bindir}/vmware-checkvm &> /dev/null && \
|
||||||
|
%{_bindir}/vmware-checkvm -p | grep -q Workstation; then
|
||||||
|
mkdir -p /mnt/hgfs
|
||||||
|
fi
|
||||||
|
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%systemd_post %{vgauthdaemon}.service
|
%systemd_post %{vgauthdaemon}.service
|
||||||
%systemd_post %{toolsdaemon}.service
|
%systemd_post %{toolsdaemon}.service
|
||||||
@ -184,20 +192,29 @@ fi
|
|||||||
%systemd_preun %{toolsdaemon}.service
|
%systemd_preun %{toolsdaemon}.service
|
||||||
%systemd_preun %{vgauthdaemon}.service
|
%systemd_preun %{vgauthdaemon}.service
|
||||||
|
|
||||||
# Tell VMware that open-vm-tools is being uninstalled
|
|
||||||
if [ "$1" = "0" -a \
|
if [ "$1" = "0" -a \
|
||||||
-e %{_bindir}/vmware-checkvm -a \
|
-f %{_bindir}/vmware-checkvm ] && \
|
||||||
-e %{_bindir}/vmware-rpctool ] && \
|
|
||||||
%{_bindir}/vmware-checkvm &> /dev/null; then
|
%{_bindir}/vmware-checkvm &> /dev/null; then
|
||||||
|
|
||||||
|
# Tell VMware that open-vm-tools is being uninstalled
|
||||||
|
if [ -f %{_bindir}/vmware-rpctool ]; then
|
||||||
%{_bindir}/vmware-rpctool 'tools.set.version 0' &> /dev/null || /bin/true
|
%{_bindir}/vmware-rpctool 'tools.set.version 0' &> /dev/null || /bin/true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Teardown mount point for Shared Folders
|
||||||
|
if [ -d /mnt/hgfs ] && \
|
||||||
|
%{_bindir}/vmware-checkvm -p | grep -q Workstation; then
|
||||||
|
umount /mnt/hgfs &> /dev/null || /bin/true
|
||||||
|
rmdir /mnt/hgfs &> /dev/null || /bin/true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%systemd_postun_with_restart %{toolsdaemon}.service
|
%systemd_postun_with_restart %{toolsdaemon}.service
|
||||||
%systemd_postun_with_restart %{vgauthdaemon}.service
|
%systemd_postun_with_restart %{vgauthdaemon}.service
|
||||||
# Cleanup GuestProxy certs if open-vm-tools is being uninstalled
|
# Cleanup GuestProxy certs if open-vm-tools is being uninstalled
|
||||||
if [ "$1" = "0" ]; then \
|
if [ "$1" = "0" ]; then
|
||||||
rm -rf %{_sysconfdir}/vmware-tools/GuestProxyData &> /dev/null || /bin/true
|
rm -rf %{_sysconfdir}/vmware-tools/GuestProxyData &> /dev/null || /bin/true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -262,6 +279,10 @@ fi
|
|||||||
%{_libdir}/libvmtools.so
|
%{_libdir}/libvmtools.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 01 2015 Ravindra Kumar <ravindrakumar@vmware.com> - 10.0.0-5
|
||||||
|
- Setup and teardown Shared Folders mount point on VMs running
|
||||||
|
on VMware Workstation or VMware Fusion.
|
||||||
|
|
||||||
* Wed Sep 30 2015 Ravindra Kumar <ravindrakumar@vmware.com> - 10.0.0-4
|
* Wed Sep 30 2015 Ravindra Kumar <ravindrakumar@vmware.com> - 10.0.0-4
|
||||||
- vmhgfs-fuse needs 'fusermount' from 'fuse'
|
- vmhgfs-fuse needs 'fusermount' from 'fuse'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user