aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2019-06-09 14:56:51 +0300
committerTimo Teräs <timo.teras@iki.fi>2019-06-09 15:28:35 +0300
commited65a96365fee561e0638656cc274926e1acde8d (patch)
tree3040629ef8dd9e44715c18353e2d50d8e96e3045
parenta3df4f4cbf4960e3e0cf1b960bcc62a883bc3357 (diff)
downloadaports-ed65a96365fee561e0638656cc274926e1acde8d.tar.bz2
aports-ed65a96365fee561e0638656cc274926e1acde8d.tar.xz
main/dbus: consistent machine-id generation, simplify init.d
generate /etc/machine-id in both init.d and post-install scripts for consistency. modernize init.d.
-rw-r--r--main/dbus/APKBUILD4
-rw-r--r--main/dbus/dbus.initd38
-rw-r--r--main/dbus/dbus.post-install2
3 files changed, 14 insertions, 30 deletions
diff --git a/main/dbus/APKBUILD b/main/dbus/APKBUILD
index e64b1ca466..a32d6ed541 100644
--- a/main/dbus/APKBUILD
+++ b/main/dbus/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dbus
pkgver=1.12.14
-pkgrel=0
+pkgrel=1
pkgdesc="Freedesktop.org message bus system"
url="https://www.freedesktop.org/Software/dbus"
pkggroups="messagebus"
@@ -64,4 +64,4 @@ x11() {
}
sha512sums="b5707a9b429683995a44ba1c61acd402f8c3f2bd867fffc46506583c67dac864c262ce3e7310f653cf3a78fa1a9cae7326a62d244a2b515f613bad274d1826c6 dbus-1.12.14.tar.gz
-df74e7d6a4f76f777d356e94bd23422b17656aa51a5b2d3c655fcabb32c84f2f06b9f5cd8827920d51842f89e8c0d968a6e723315e4bf216e55711fcda9b0ee9 dbus.initd"
+f3d924e0f0fdced39f0470fac362834acf9f346acdfadbcdf44f627a1b550a69d1d04b3760ff06dc86a7335824f48d3c1faa09a17071e08731705a5fb016a155 dbus.initd"
diff --git a/main/dbus/dbus.initd b/main/dbus/dbus.initd
index 9b7cdd4302..af4fd0c6c7 100644
--- a/main/dbus/dbus.initd
+++ b/main/dbus/dbus.initd
@@ -1,50 +1,34 @@
#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/files/dbus.initd,v 1.1 2011/11/05 13:56:10 ssuominen Exp $
extra_started_commands="reload"
+description="D-BUS system messagebus"
+pidfile="/var/run/dbus.pid"
+command="/usr/bin/dbus-daemon"
+command_args="--system"
+
depend() {
need localmount
after bootmisc
}
-start() {
- ebegin "Starting D-BUS system messagebus"
+start_pre() {
/usr/bin/dbus-uuidgen --ensure=/etc/machine-id
# We need to test if /var/run/dbus exists, since script will fail if it does not
- [ ! -e /var/run/dbus ] && mkdir /var/run/dbus
-
- start-stop-daemon --start --pidfile /var/run/dbus.pid --exec /usr/bin/dbus-daemon -- --system
- eend $?
+ [ -e /var/run/dbus ] || mkdir /var/run/dbus
}
-stop() {
- local retval
-
- ebegin "Stopping D-BUS system messagebus"
-
- start-stop-daemon --stop --pidfile /var/run/dbus.pid
- retval=$?
-
- eend ${retval}
-
- [ -S /var/run/dbus/system_bus_socket ] && rm -f /var/run/dbus/system_bus_socket
-
- return ${retval}
+stop_post() {
+ [ ! -S /var/run/dbus/system_bus_socket ] || rm -f /var/run/dbus/system_bus_socket
}
reload() {
- local retval
-
ebegin "Reloading D-BUS messagebus config"
-
/usr/bin/dbus-send --print-reply --system --type=method_call \
--dest=org.freedesktop.DBus \
/ org.freedesktop.DBus.ReloadConfig > /dev/null
- retval=$?
- eend ${retval}
- return ${retval}
+ eend $?
}
diff --git a/main/dbus/dbus.post-install b/main/dbus/dbus.post-install
index 305297a482..1120ec2048 100644
--- a/main/dbus/dbus.post-install
+++ b/main/dbus/dbus.post-install
@@ -1,3 +1,3 @@
#!/bin/sh
-exec dbus-uuidgen --ensure
+exec dbus-uuidgen --ensure=/etc/machine-id