NetworkManager: added runit service.

This commit is contained in:
Juan RP 2014-10-13 12:10:02 +02:00
parent 444ab19586
commit a8c94d8347
3 changed files with 15 additions and 4 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh
sv check dbus >/dev/null || exit 1
# Create required dirs
[ ! -d /etc/NetworkManager/dispatcher.d ] && mkdir -m0755 -p /etc/NetworkManager/dispatcher.d
[ ! -d /etc/NetworkManager/system-connections ] && mkdir -m0755 -p /etc/NetworkManager/system-connections
[ ! -d /var/lib/NetworkManager ] && mkdir -m0700 -p /var/lib/NetworkManager
exec NetworkManager -n

View File

@ -0,0 +1 @@
/run/runit/supervise.NetworkManager

View File

@ -1,7 +1,7 @@
# Template file for 'NetworkManager'
pkgname=NetworkManager
version=0.9.10.0
revision=4
revision=5
build_style=gnu-configure
configure_args="--with-dhcpcd=/usr/sbin/dhcpcd --with-dhclient=no
--with-system-ca-path=/etc/ssl/certs --enable-more-warnings=no
@ -30,7 +30,7 @@ makedepends="libuuid-devel gnutls-devel dbus-glib-devel libgudev-devel
lib32disabled=yes
depends="dbus iproute2 dhcpcd>=5.5.4_1 wpa_supplicant ModemManager mobile-broadband-provider-info"
conf_files="/etc/${pkgname}/${pkgname}.conf"
systemd_services="${pkgname}.service on ${pkgname}-dispatcher.service on"
replaces="runit-void<20141013_2"
# Package build options
build_options="gir systemd"
@ -50,6 +50,7 @@ if [ "$build_option_systemd" ]; then
configure_args+=" --with-session-tracking=systemd --with-suspend-resume=systemd"
configure_args+=" --with-systemdsystemunitdir=/usr/lib/systemd/system"
makedepends+=" systemd-devel"
systemd_services="${pkgname}.service on ${pkgname}-dispatcher.service on"
else
configure_args+=" --with-session-tracking=consolekit --with-suspend-resume=upower"
fi
@ -63,9 +64,12 @@ pre_configure() {
post_install() {
vinstall ${FILESDIR}/${pkgname}.conf 644 etc/${pkgname}
vinstall ${FILESDIR}/tmpfilesd 644 usr/lib/tmpfiles.d ${pkgname}.conf
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/tmpfilesd 644 usr/lib/tmpfiles.d ${pkgname}.conf
fi
# remove unused stuff
rm -rf ${DESTDIR}/etc/init.d
vsv ${pkgname}
}
libnm_package() {
@ -78,7 +82,6 @@ libnm_package() {
fi
}
}
NetworkManager-devel_package() {
depends="dbus-glib-devel libnm-${version}_${revision}"
short_desc+=" - development files"