#!/sbin/runscript # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: depend() { need localmount before xdm } start() { ebegin "Starting VirtualBox guest additions" einfo " Loading kernel modules" /sbin/modprobe vboxguest &> /dev/null /sbin/modprobe vboxsf &> /dev/null start-stop-daemon --start --make-pidfile \ --exec /usr/sbin/vboxguest-service --pidfile /var/run/vboxguest-service.pid \ --name vboxguest-service \ --background -- \ --foreground eend $? "Failed to start vboxguest-service" } stop() { local retval=1 ebegin "Stopping VirtualBox guest additions" start-stop-daemon --stop --quiet \ --pidfile /var/run/vboxguest-service.pid --name vboxguest-service \ && retval=0 einfo "Removing kernel modules" /sbin/modprobe -r vboxsf &> /dev/null /sbin/modprobe -r vboxguest &> /dev/null eend ${retval} "Failed to stop vboxguest-service" }