]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2003-07-28 Havoc Pennington <hp@redhat.com>
authorHavoc Pennington <hp@redhat.com>
Mon, 28 Jul 2003 14:04:51 +0000 (14:04 +0000)
committerHavoc Pennington <hp@redhat.com>
Mon, 28 Jul 2003 14:04:51 +0000 (14:04 +0000)
* bus/messagebus.in: fix to avoid processname/servicename
confusion, from Michael Kearey
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965

ChangeLog
bus/messagebus.in

index 36c72c7d42b4f19de24a9cec204f976ffea5234c..93ead8c64dfd91d8542b136ed08f721e7d9906ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-28  Havoc Pennington  <hp@redhat.com>
+
+       * bus/messagebus.in: fix to avoid processname/servicename 
+       confusion, from Michael Kearey
+       https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
+       
 2003-07-23  Havoc Pennington  <hp@pobox.com>
 
        * dbus/dbus-message.c (dbus_message_iter_get_named): 
index e4a169672a1cc9a220fed62503c78d0e14c78230..7a35876417c77f11896d7bcfd9e3f95a19d899d8 100755 (executable)
 # 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 -n $"Starting system message bus: "
-    daemon --check messagebus dbus-daemon-1 --system
+    daemon --check $servicename $processname --system
     RETVAL=$?
     echo
-    [ $RETVAL -eq 0 ] && touch @EXPANDED_LOCALSTATEDIR@/lock/subsys/messagebus
+    [ $RETVAL -eq 0 ] && touch @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename
 }
 
 stop() {
     echo -n $"Stopping system message bus: "
 
-    ## we don't want to kill all the per-user dbus-daemon-1, we want
+    ## 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 "messagebus" that should be safe-ish
-    killproc messagebus -TERM
+    ## program name "$servicename" that should be safe-ish
+    killproc $servicename -TERM
     RETVAL=$?
     echo
     if [ $RETVAL -eq 0 ]; then
-        rm -f @EXPANDED_LOCALSTATEDIR@/lock/subsys/messagebus
+        rm -f @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename
         rm -f @DBUS_SYSTEM_PID_FILE@
     fi
 }
@@ -50,7 +54,7 @@ case "$1" in
         stop
         ;;
     status)
-        status messagebus
+        status $processname
         RETVAL=$?
         ;;
     restart)
@@ -58,7 +62,7 @@ case "$1" in
         start
         ;;
     condrestart)
-        if [ -f @EXPANDED_LOCALSTATEDIR@/lock/subsys/messagebus ]; then
+        if [ -f @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename ]; then
             stop
             start
         fi