dbus/bus rc.messagebus.in,NONE,1.1 Makefile.am,1.31,1.32

Colin Walters walters at freedesktop.org
Fri Oct 29 12:17:59 PDT 2004


Update of /cvs/dbus/dbus/bus
In directory gabe:/tmp/cvs-serv17228/bus

Modified Files:
	Makefile.am 
Added Files:
	rc.messagebus.in 
Log Message:
2004-10-29  Colin Walters  <walters at redhat.com>

	Patch from Kristof Vansant <de_lupus at pandora.be>

	* configure.in: Detect Slackware.
	* bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
	* bus/rc.messagebus.in: New file.


--- NEW FILE: rc.messagebus.in ---
#!/bin/sh
#
# messagebus:   The D-BUS systemwide message bus
#
# chkconfig: 345 97 03
# description:  This is a daemon which broadcasts notifications of system events \
#               and other messages. See http://www.freedesktop.org/software/dbus/
#
# processname: dbus-daemon-1
# pidfile: @DBUS_SYSTEM_PID_FILE@
#

# Sanity checks.
#[ -x @EXPANDED_BINDIR@/dbus-daemon-1 ] || exit 0

# Source function library.
#. @EXPANDED_SYSCONFDIR@/rc.d/init.d/functions

# so we can rearrange this easily
#processname=dbus-daemon-1
#servicename=messagebus

#RETVAL=0

start() {
    echo "Starting system message bus"
    if [ -x @EXPANDED_BINDIR@/dbus-daemon-1 ];then
    	@EXPANDED_BINDIR@/dbus-daemon-1 --system
    fi
    #daemon --check $servicename $processname --system
    #RETVAL=$?
    #echo
    #[ $RETVAL -eq 0 ] && touch @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename
}

stop() {
    echo "Stopping system message bus"

    ## we don't want to kill all the per-user $processname, we want
    ## to use the pid file *only*; because we use the fake nonexistent 
    ## program name "$servicename" that should be safe-ish
    killall dbus-daemon-1
    #RETVAL=$?
    #echo
    #if [ $RETVAL -eq 0 ]; then
    #    rm -f @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename
    #    rm -f @DBUS_SYSTEM_PID_FILE@
    #fi
}

# See how we were called.
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status $processname
        RETVAL=$?
        ;;
    restart)
        stop
        start
        ;;
    reload)
        echo "Message bus can't reload its configuration, you have to restart it"
        RETVAL=$?
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|reload}"
        ;;
esac
exit $RETVAL

Index: Makefile.am
===================================================================
RCS file: /cvs/dbus/dbus/bus/Makefile.am,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- Makefile.am	25 Oct 2004 18:48:58 -0000	1.31
+++ Makefile.am	29 Oct 2004 19:17:57 -0000	1.32
@@ -95,7 +95,8 @@
 	$(mkinstalldirs) $(DESTDIR)/$(datadir)/dbus-1/services
 
 #### Init scripts fun
-SCRIPT_IN_FILES=messagebus.in
+SCRIPT_IN_FILES=messagebus.in \
+		rc.messagebus.in
 
 ## Red Hat start
 if DBUS_INIT_SCRIPTS_RED_HAT
@@ -107,6 +108,17 @@
 
 endif
  ## Red Hat end
+ 
+## Slackware start
+if DBUS_INIT_SCRIPTS_SLACKWARE
+
+initddir=$(sysconfdir)/rc.d/
+
+initd_SCRIPTS= 	\
+	rc.messagebus
+
+endif
+## Slackware end
 
 MAN_IN_FILES=dbus-daemon-1.1.in
 man_MANS = dbus-daemon-1.1



More information about the dbus-commit mailing list