virtualbox-ose: switch to systemd, drop openrc support.
This commit is contained in:
parent
7853980023
commit
fffbc1f0da
|
@ -1,33 +0,0 @@
|
|||
#!/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 $?
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
#
|
||||
# OpenRC service for VirtualBox.
|
||||
|
||||
name="VirtualBox module (un)loader"
|
||||
|
||||
depend()
|
||||
{
|
||||
provide virtualbox
|
||||
need sysfs
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
ebegin "Loading VirtualBox host modules"
|
||||
for _mod_ in vboxdrv vboxnetadp vboxnetflt; do
|
||||
if grep -vq '^${_mod_}' /proc/modules; then
|
||||
modprobe -q ${_mod_}
|
||||
fi
|
||||
done
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
ebegin "Unloading VirtualBox host modules"
|
||||
for _mod_ in vboxnetflt vboxnetadp vboxdrv; do
|
||||
if ! grep -q '^${_mod_}' /proc/modules; then
|
||||
modprobe -rq ${_mod_}
|
||||
fi
|
||||
done
|
||||
eend $?
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
pkgname=virtualbox-ose
|
||||
_vbox_distver=4.1.4
|
||||
version=${_vbox_distver}
|
||||
revision=1
|
||||
revision=2
|
||||
patch_args="-Np1"
|
||||
wrksrc="VirtualBox-${version}_OSE"
|
||||
distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2"
|
||||
|
@ -19,7 +19,7 @@ long_desc="
|
|||
system_groups="vboxusers"
|
||||
gtk_iconcache_dirs="/usr/share/icons/hicolor"
|
||||
subpackages="${pkgname}-dkms ${pkgname}-guest ${pkgname}-guest-dkms"
|
||||
openrc_services="virtualbox default true"
|
||||
systemd_services="virtualbox.service"
|
||||
|
||||
Add_dependency run libgcc
|
||||
Add_dependency run glibc
|
||||
|
@ -148,8 +148,6 @@ do_install()
|
|||
install -m0644 ${wrksrc}/COPYING* \
|
||||
${DESTDIR}/usr/share/licenses/${pkgname}
|
||||
|
||||
# Install the OpenRC service.
|
||||
vinstall ${FILESDIR}/virtualbox.rc 755 etc/init.d virtualbox
|
||||
# Install systemd unit.
|
||||
vinstall ${FILESDIR}/virtualbox.service 644 lib/systemd/system
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ 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"
|
||||
revision=2
|
||||
systemd_services="virtualbox-guest.service"
|
||||
|
||||
Add_dependency run libgcc
|
||||
Add_dependency run glibc
|
||||
|
@ -52,6 +52,5 @@ do_install()
|
|||
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue