wok-current rev 2653

acpid: up to 1.0.8
author Dominique Corbex <domcox@users.sourceforge.net>
date Sat Apr 18 16:57:45 2009 +0200 (2009-04-18)
parents d0efd4654127
children 178af875768f
files acpid/receipt acpid/stuff/init.d/acpid
line diff
     1.1 --- a/acpid/receipt	Sat Apr 18 17:51:16 2009 +0200
     1.2 +++ b/acpid/receipt	Sat Apr 18 16:57:45 2009 +0200
     1.3 @@ -1,8 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="acpid"
     1.7 -VERSION="1.0.6"
     1.8 -EXTRAVERSION="-3"
     1.9 +VERSION="1.0.8"
    1.10  CATEGORY="system-tools"
    1.11  SHORT_DESC="The ACPI event daemon"
    1.12  MAINTAINER="domcox@users.sourceforge.net"
     2.1 --- a/acpid/stuff/init.d/acpid	Sat Apr 18 17:51:16 2009 +0200
     2.2 +++ b/acpid/stuff/init.d/acpid	Sat Apr 18 16:57:45 2009 +0200
     2.3 @@ -12,37 +12,36 @@
     2.4  DESC="ACPI event deamon"
     2.5  DAEMON=/usr/sbin/acpid
     2.6  OPTIONS=$ACPID_OPTIONS
     2.7 -NPID=`ps ax | grep $DAEMON | wc -l`
     2.8 -PID=`ps ax | grep $DAEMON | awk '{print $1}'`
     2.9 +PIDFILE=/var/run/acpid.pid
    2.10  
    2.11  case "$1" in
    2.12    start)
    2.13 -    if [ $NPID -ne 0  ] ; then
    2.14 +    if [ -f $PIDFILE ] ; then
    2.15        echo "$NAME already running."
    2.16        exit 1
    2.17      fi
    2.18      echo -n "Starting $DESC: $NAME... "
    2.19 -    $DAEMON $OPTIONS > /dev/null
    2.20 +    $DAEMON $OPTIONS
    2.21      status
    2.22      ;;
    2.23    stop)
    2.24 -    if [ $NPID -eq 0 ] ; then
    2.25 +    if [ ! -f $PIDFILE ] ; then
    2.26        echo "$NAME is not running."
    2.27        exit 1
    2.28      fi
    2.29      echo -n "Stopping $DESC: $NAME... "
    2.30 -    kill $PID
    2.31 +    kill `cat $PIDFILE`
    2.32      status
    2.33      ;;
    2.34    restart)
    2.35 -    if [ $NPID -eq 0 ] ; then
    2.36 +    if [ ! -f $PIDFILE ] ; then
    2.37        echo "$NAME is not running."
    2.38        exit 1
    2.39      fi
    2.40      echo -n "Restarting $DESC: $NAME... "
    2.41 -    kill $PID
    2.42 +    kill `cat $PIDFILE`
    2.43      sleep 2
    2.44 -    $DAEMON $OPTIONS > /dev/null
    2.45 +    $DAEMON $OPTIONS
    2.46      status
    2.47      ;;
    2.48    *)