summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd
blob: 9de2ee07c92f9874e59b1598ec552a5a02db0b3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/sbin/runscript
# Copyright 1999-2013 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-8.initd,v 1.2 2013/02/11 22:13:47 polynomial-c Exp $

pidfile="/var/run/vboxguest-service.pid"
command="/usr/sbin/vboxguest-service"
command_args="--foreground"
start_stop_daemon_args="--make-pidfile --pidfile ${pidfile} --background"

depend() {
        need dbus localmount
	before xdm
}

start_pre() {
	einfo "Loading kernel modules"
	/sbin/modprobe vboxguest 2>&1
	/sbin/modprobe vboxsf 2>&1
}

stop_post() {
	einfo "Removing kernel modules"
	/sbin/modprobe -r vboxsf 2>&1
	/sbin/modprobe -r vboxguest 2>&1
}