packages/dbus: use new service functions
authorNicolas Thill <nico@openwrt.org>
Fri, 11 Nov 2011 15:46:30 +0000 (15:46 +0000)
committerNicolas Thill <nico@openwrt.org>
Fri, 11 Nov 2011 15:46:30 +0000 (15:46 +0000)
SVN-Revision: 28947

utils/dbus/Makefile
utils/dbus/files/dbus.init

index 91e202480e0409d9c409d7a9a391e693dc4d555a..b275c21036d26b8dfaa2b8f0e78d89e82352e355 100644 (file)
@@ -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/
index 1c622fc5548f246ca8120cf127dd48959d88e6bb..42940837782c22a95833ff56a3489a6adf9b49de 100644 (file)
@@ -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
 }
-