From b255131c0d2b6b9586d2d2a2bfb4193aff856015 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Fri, 11 Nov 2011 15:46:30 +0000 Subject: [PATCH] packages/dbus: use new service functions SVN-Revision: 28947 --- utils/dbus/Makefile | 4 ++-- utils/dbus/files/dbus.init | 28 +++++++++------------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/utils/dbus/Makefile b/utils/dbus/Makefile index 91e202480..b275c2103 100644 --- a/utils/dbus/Makefile +++ b/utils/dbus/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2009 OpenWrt.org +# Copyright (C) 2007-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk # Make sure to also update the dbus-x package PKG_NAME:=dbus PKG_VERSION:=1.4.14 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/ diff --git a/utils/dbus/files/dbus.init b/utils/dbus/files/dbus.init index 1c622fc55..429408377 100644 --- a/utils/dbus/files/dbus.init +++ b/utils/dbus/files/dbus.init @@ -1,27 +1,17 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2007-2008 OpenWrt.org - -SSD=start-stop-daemon -PIDF=/var/run/dbus.pid -PROG=/usr/sbin/dbus-daemon -ARGS=--system +# Copyright (C) 2007-2011 OpenWrt.org START=60 -start() { - if [ -x /usr/bin/dbus-uuidgen ]; then - mkdir -p /var/lib/dbus/ - /usr/bin/dbus-uuidgen --ensure - fi - mkdir -p /var/run/dbus - $SSD -S -p $PIDF -q -x $PROG -- $ARGS -} +SERVICE_PID_FILE=/var/run/dbus.pid -stop() { - $SSD -K -p $PIDF -q +start() { + mkdir -m 0755 -p /var/lib/dbus + mkdir -m 0755 -p /var/run/dbus + [ -x /usr/bin/dbus-uuidgen ] && /usr/bin/dbus-uuidgen --ensure + service_start /usr/sbin/dbus-daemon --system } -status() { - ps | grep -q "^ *$(cat $PIDF 2>/dev/null) *.*$PROG" +stop() { + service_stop /usr/sbin/dbus-daemon && rm $SERVICE_PID_FILE } - -- 2.30.2