--- virtualbox-guest-additions-3.1.0.ebuild.orig 2009-12-20 12:53:48.000000000 +0100 +++ virtualbox-guest-additions-3.1.0.ebuild 2009-12-31 01:39:01.000000000 +0100 @@ -99,10 +99,10 @@ cd "${S}"/out/linux.${ARCH}/release/bin/additions insinto /sbin - newins mountvboxsf mount.vboxsf + newins mount.vboxsf mount.vboxsf fperms 4755 /sbin/mount.vboxsf - newinitd "${FILESDIR}"/${PN}-3.initd ${PN} + newinitd "${FILESDIR}"/vboxguest-service.init vboxguest-service insinto /usr/sbin/ newins VBoxService vboxguest-service @@ -121,16 +121,33 @@ newins VBoxRandR.sh VBoxRandR fperms 0755 /usr/bin/VBoxRandR - newins 98vboxguest-xclient VBoxClient-all + newins 98vboxadd-xclient VBoxClient-all fperms 0755 /usr/bin/VBoxClient-all fi # udev rule for vboxdrv dodir /etc/udev/rules.d - echo 'KERNEL=="vboxguest", NAME="vboxguest", OWNER="vboxguest", MODE="0660"' \ + echo 'KERNEL=="vboxguest", NAME="vboxguest", OWNER="vboxguest", MODE="0660", RUN+="vboxguest-service.sh"' \ >> "${D}/etc/udev/rules.d/60-virtualbox-guest-additions.rules" - echo 'KERNEL=="vboxuser", NAME="vboxuser", OWNER="vboxguest", MODE="0660"' \ + echo 'KERNEL=="vboxuser", NAME="vboxuser", OWNER="vboxguest", MODE="0666"' \ >> "${D}/etc/udev/rules.d/60-virtualbox-guest-additions.rules" + + # hotplug script for udev + insinto /$(get_libdir)/udev + doins "${FILESDIR}"/vboxguest-service.sh + fperms 0755 /$(get_libdir)/udev/vboxguest-service.sh + + # VBoxClient autostart file + insinto /etc/xdg/autostart + doins "${FILESDIR}"/vboxclient.desktop + + # modprobe alias to autoload vboxvfs when needed + insinto /etc/modprobe.d + doins "${FILESDIR}"/vboxsf.conf + + # sample xorg.conf + insinto /usr/share/doc/${PF} + doins "${FILESDIR}"/xorg.conf } pkg_postinst() { @@ -139,10 +156,21 @@ elog "use flag X is off, enable it to install the" elog "X Window System input and video drivers" fi - elog "Please add:" - elog "/etc/init.d/${PN}" - elog "to the default runlevel in order to load all" - elog "needed modules and services." + elog "To use the VirtualBox X drivers, use the following" + elog "file as your /etc/X11/xorg.conf:" + elog " /usr/share/doc/${PF}/xorg.conf" + elog "" + elog "Also make sure you use the Mesa library for OpenGL:" + elog " eselect opengl set xorg-x11" + elog "" + elog "No additional configuration is required then." + elog "The vboxguest-service init script will be autostarted" + elog "by udev when running in VirtualBox, and an autostart" + elog ".desktop file has been installed to start VBoxClient" + elog "in desktop sessions." + elog "" + elog "You can mount shared folders with:" + elog " mount -t vboxsf " elog "" elog "Warning:" elog "this ebuild is only needed if you are running gentoo"