]> git.pld-linux.org Git - packages/VirtualBox.git/commitdiff
add vboxsf group, for Shared Folders Automount to work
authorElan Ruusamäe <glen@delfi.ee>
Sat, 1 Mar 2014 20:50:25 +0000 (22:50 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 1 Mar 2014 20:50:25 +0000 (22:50 +0200)
http://www.virtualbox.org/manual/ch04.html#sf_mount_auto
see common/VBoxService/VBoxServiceAutoMount.cpp VBoxServiceAutoMountProcessMappings()

VirtualBox.spec

index 2199d65aa48b227417f10c6e09d68820018fc552..7feaaa1b6687e3cb0bdd58951b5d41341ebb8f92 100644 (file)
@@ -272,8 +272,12 @@ You should install this package in your Host OS.
 %package guest
 Summary:       VirtualBox Guest tools
 Group:         Base
-Requires(post,preun):  /sbin/chkconfig
+Provides:      group(vboxsf)
 Requires(post):        systemd-units >= 38
+Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
 Requires:      rc-scripts
 Requires:      systemd-units >= 38
 Suggests:      kernel(vboxguest)
@@ -786,6 +790,11 @@ fi
 %update_icon_cache hicolor
 %update_mime_database
 
+%pre guest
+# Add a group "vboxsf" for Shared Folders access
+# All users which want to access the auto-mounted Shared Folders have to be added to this group.
+%groupadd -g 266 -r -f vboxsf
+
 %post guest
 /sbin/chkconfig --add vboxservice
 %service vboxservice restart
@@ -799,6 +808,9 @@ fi
 %systemd_preun vboxservice.service
 
 %postun guest
+if [ "$1" = "0" ]; then
+       %groupremove vboxsf
+fi
 %systemd_reload
 
 %triggerpostun guest -- VirtualBox-guest < 4.3.0-1
This page took 0.102227 seconds and 4 git commands to generate.