virtualbox-ose{,-guest}: added a systemd service to (un)load its modules.

This commit is contained in:
Juan RP 2011-10-10 16:35:52 +02:00
parent 9fd57e4585
commit 78040efe34
4 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,12 @@
[Unit]
Description=Virtualbox host (de)initialization
DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/modprobe -qa vboxguest vboxsf vboxvideo
ExecStop=/sbin/modprobe -rqa vboxvideo vboxsf vboxguest
[Install]
WantedBy=graphical.target

View File

@ -0,0 +1,12 @@
[Unit]
Description=Virtualbox host (de)initialization
DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/modprobe -qa vboxdrv vboxnetadp vboxnetflt
ExecStop=/sbin/modprobe -rqa vboxnetflt vboxnetadp vboxdrv
[Install]
WantedBy=graphical.target

View File

@ -2,6 +2,7 @@
pkgname=virtualbox-ose
_vbox_distver=4.1.4
version=${_vbox_distver}
revision=1
patch_args="-Np1"
wrksrc="VirtualBox-${version}_OSE"
distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2"
@ -148,6 +149,7 @@ do_install()
${DESTDIR}/usr/share/licenses/${pkgname}
# Install the OpenRC service.
install -D -m755 ${FILESDIR}/virtualbox.rc \
${DESTDIR}/etc/init.d/virtualbox
vinstall ${FILESDIR}/virtualbox.rc 755 etc/init.d virtualbox
# Install systemd unit.
vinstall ${FILESDIR}/virtualbox.service 644 lib/systemd/system
}

View File

@ -8,6 +8,7 @@ long_desc="${long_desc}
They provide closer integration and allow to share data through shared folders
between the host system and the virtual machine."
revision=1
openrc_services="virtualbox-guest default true"
Add_dependency run libgcc
@ -52,4 +53,5 @@ do_install()
install -m755 -D pam_vbox.so ${DESTDIR}/lib/security/pam_vbox.so
vinstall ${FILESDIR}/virtualbox-guest.rc 755 etc/init.d virtualbox-guest
vinstall ${FILESDIR}/virtualbox-guest.service 644 lib/systemd/system
}