Changeset 28947


Ignore:
Timestamp:
2011-11-11T16:46:30+01:00 (6 years ago)
Author:
nico
Message:

packages/dbus: use new service functions

Location:
packages/utils/dbus
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/dbus/Makefile

    r28015 r28947  
    11# 
    2 # Copyright (C) 2007-2009 OpenWrt.org 
     2# Copyright (C) 2007-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1111PKG_NAME:=dbus 
    1212PKG_VERSION:=1.4.14 
    13 PKG_RELEASE:=1 
     13PKG_RELEASE:=2 
    1414 
    1515PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/utils/dbus/files/dbus.init

    r12741 r28947  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2007-2008 OpenWrt.org 
    3  
    4 SSD=start-stop-daemon 
    5 PIDF=/var/run/dbus.pid 
    6 PROG=/usr/sbin/dbus-daemon 
    7 ARGS=--system 
     2# Copyright (C) 2007-2011 OpenWrt.org 
    83 
    94START=60 
     5 
     6SERVICE_PID_FILE=/var/run/dbus.pid 
     7 
    108start() { 
    11         if [ -x /usr/bin/dbus-uuidgen ]; then 
    12                 mkdir -p /var/lib/dbus/ 
    13                 /usr/bin/dbus-uuidgen --ensure 
    14         fi 
    15  
    16         mkdir -p /var/run/dbus 
    17         $SSD -S -p $PIDF -q -x $PROG -- $ARGS 
     9        mkdir -m 0755 -p /var/lib/dbus 
     10        mkdir -m 0755 -p /var/run/dbus 
     11        [ -x /usr/bin/dbus-uuidgen ] && /usr/bin/dbus-uuidgen --ensure 
     12        service_start /usr/sbin/dbus-daemon --system 
    1813} 
    1914 
    2015stop() { 
    21         $SSD -K -p $PIDF -q 
     16        service_stop /usr/sbin/dbus-daemon && rm $SERVICE_PID_FILE 
    2217} 
    23  
    24 status() { 
    25         ps | grep -q "^ *$(cat $PIDF 2>/dev/null) *.*$PROG" 
    26 } 
    27  
Note: See TracChangeset for help on using the changeset viewer.