packages/dbus: use new service functions

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28947 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2011-11-11 15:46:30 +00:00
parent 6748d04783
commit 7801afab1c
2 changed files with 11 additions and 21 deletions

View 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/

View 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
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
}
stop() {
$SSD -K -p $PIDF -q
service_stop /usr/sbin/dbus-daemon && rm $SERVICE_PID_FILE
}
status() {
ps | grep -q "^ *$(cat $PIDF 2>/dev/null) *.*$PROG"
}