void-packages/srcpkgs/virtualbox-ose/files/virtualbox-guest.rc
Juan RP f19e7ca4eb virtualbox-ose-guest: make vboxvideo work, added openrc service.
With this commit gnome3 and gnome-shell works by default, required
guest modules are loaded automatically by the openrc service.
2011-08-14 11:20:10 +02:00

33 lines
539 B
Text

#!/sbin/runscript
#
# OpenRC service for VirtualBox Guest.
name="VirtualBox guest module (un)loader"
depend()
{
provide virtualbox-guest
need sysfs
}
start()
{
ebegin "Loading VirtualBox guest modules"
for _mod_ in vboxguest vboxsf vboxvideo; do
if grep -vq '^${_mod_}' /proc/modules; then
modprobe -q ${_mod_}
fi
done
eend $?
}
stop()
{
ebegin "Unloading VirtualBox guest modules"
for _mod_ in vboxvideo vboxsf vboxguest; do
if ! grep -q '^${_mod_}' /proc/modules; then
modprobe -rq ${_mod_}
fi
done
eend $?
}