f19e7ca4eb
With this commit gnome3 and gnome-shell works by default, required guest modules are loaded automatically by the openrc service.
33 lines
539 B
Text
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 $?
|
|
}
|