diff options
author | David P <megver83@parabola.nu> | 2022-07-18 22:39:55 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2022-07-18 22:39:55 -0400 |
commit | 905728e4e1fdc1db2d09a97e0b94ab7fb59b4369 (patch) | |
tree | e5906c71c837be74a4203400283bad0d6cb570b0 | |
parent | 8eb5f4abcd65b72f6195c8b00511e8728b3a3d40 (diff) | |
download | abslibre-905728e4e1fdc1db2d09a97e0b94ab7fb59b4369.tar.gz abslibre-905728e4e1fdc1db2d09a97e0b94ab7fb59b4369.tar.bz2 abslibre-905728e4e1fdc1db2d09a97e0b94ab7fb59b4369.zip |
addpkg: nonsystemd/dbus-openrc 20210418-2
Signed-off-by: David P <megver83@parabola.nu>
-rw-r--r-- | nonsystemd/dbus-openrc/80-dbus | 12 | ||||
-rw-r--r-- | nonsystemd/dbus-openrc/PKGBUILD | 29 | ||||
-rw-r--r-- | nonsystemd/dbus-openrc/dbus-reload.hook | 13 | ||||
-rw-r--r-- | nonsystemd/dbus-openrc/dbus.initd | 36 |
4 files changed, 90 insertions, 0 deletions
diff --git a/nonsystemd/dbus-openrc/80-dbus b/nonsystemd/dbus-openrc/80-dbus new file mode 100644 index 000000000..81f830e3a --- /dev/null +++ b/nonsystemd/dbus-openrc/80-dbus @@ -0,0 +1,12 @@ +#!/bin/bash + +# launches a session dbus instance + +dbuslaunch="$(which dbus-launch 2>/dev/null)" +if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + if [ -n "$command" ]; then + command="$dbuslaunch --exit-with-session $command" + else + eval $($dbuslaunch --sh-syntax --exit-with-session) + fi +fi diff --git a/nonsystemd/dbus-openrc/PKGBUILD b/nonsystemd/dbus-openrc/PKGBUILD new file mode 100644 index 000000000..cfae7f193 --- /dev/null +++ b/nonsystemd/dbus-openrc/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: artoo <artoo@artixlinux.org> + +pkgname=dbus-openrc +pkgver=20210418 +pkgrel=2 +pkgdesc="OpenRC dbus init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('dbus' 'openrc') +provides=('init-dbus') +conflicts=('init-dbus') +source=('dbus.initd' + 'dbus-reload.hook' + '80-dbus') +sha256sums=('3801358d1fe65db3711851c4a2d7c491c8750c899d8effdf37eb64d34683e91b' + '517cb12a30f84ba9580532d5485ce219ad96668480db99fcd4954c7017a0ea47' + '6d637acae40368db9e7c005b2e53483882014caef281fe9e801633ba7cc3b7dd') + +package() { + install -Dm755 "${srcdir}"/dbus.initd "${pkgdir}"/etc/init.d/dbus + + install -d "${pkgdir}"/etc/runlevels/default + ln -sf /etc/init.d/dbus "${pkgdir}"/etc/runlevels/default/dbus + + install -Dt "${pkgdir}"/usr/share/libalpm/hooks -m644 *.hook + + install -Dm755 "${srcdir}"/80-dbus "${pkgdir}"/etc/X11/xinit/xinitrc.d/80-dbus.sh +} diff --git a/nonsystemd/dbus-openrc/dbus-reload.hook b/nonsystemd/dbus-openrc/dbus-reload.hook new file mode 100644 index 000000000..296ab08e1 --- /dev/null +++ b/nonsystemd/dbus-openrc/dbus-reload.hook @@ -0,0 +1,13 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = etc/dbus-1/system.d/*.conf +Target = usr/share/dbus-1/system.d/*.conf +Target = usr/share/dbus-1/system-services/*.service + +[Action] +Description = Reloading system bus configuration... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/openrc-hook reload dbus diff --git a/nonsystemd/dbus-openrc/dbus.initd b/nonsystemd/dbus-openrc/dbus.initd new file mode 100644 index 000000000..c5d799d98 --- /dev/null +++ b/nonsystemd/dbus-openrc/dbus.initd @@ -0,0 +1,36 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License, v2 or later + +supervisor=supervise-daemon +description="An IPC message bus daemon" +command="/usr/bin/dbus-daemon" +command_args="--system" +command_args_foreground="--nofork --nopidfile" +extra_started_commands="reload" + +dbus_socket="/run/dbus/system_bus_socket" + +depend() { + need localmount + after bootmisc +} + +start_pre() { + /usr/bin/dbus-uuidgen --ensure=/etc/machine-id + + # We need to test if /run/dbus exists, since script will fail if it does not + checkpath -q -d "/run/dbus" +} + +stop_post() { + [ ! -S "${dbus_socket}" ] || rm -f "${dbus_socket}" +} + +reload() { + ebegin "Reloading D-BUS messagebus config" + dbus-send --print-reply --system --type=method_call \ + --dest=org.freedesktop.DBus \ + / org.freedesktop.DBus.ReloadConfig > /dev/null + eend $? +} |