You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-...

41 lines
1.1 KiB

#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.initd,v 1.2 2012/01/15 19:42:39 tove Exp $
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"
}