[Pkg-utopia-commits] r340 - packages/experimental/dbus/debian

Sjoerd Simons sjoerd at costa.debian.org
Fri Oct 28 13:29:16 UTC 2005


Author: sjoerd
Date: 2005-10-28 13:29:15 +0000 (Fri, 28 Oct 2005)
New Revision: 340

Modified:
   packages/experimental/dbus/debian/changelog
   packages/experimental/dbus/debian/dbus.init
Log:
Some updated to the init script

Modified: packages/experimental/dbus/debian/changelog
===================================================================
--- packages/experimental/dbus/debian/changelog	2005-10-28 12:36:23 UTC (rev 339)
+++ packages/experimental/dbus/debian/changelog	2005-10-28 13:29:15 UTC (rev 340)
@@ -3,8 +3,11 @@
   * maintainance is actually spelled "maintenance" (Closes: #332238)
   * Disable --enable-verbose because of the big performance hit
   * Move dbus-launch and dbus-send into the dbus package
+  * Add reload function to the init script 
+  * Use log_daemon_msg instead of log_begin_msg in the init script where
+    applicable
 
- -- Sjoerd Simons <sjoerd at debian.org>  Fri, 28 Oct 2005 12:36:34 +0200
+ -- Sjoerd Simons <sjoerd at debian.org>  Fri, 28 Oct 2005 15:19:54 +0200
 
 dbus (0.50-1) experimental; urgency=low
 

Modified: packages/experimental/dbus/debian/dbus.init
===================================================================
--- packages/experimental/dbus/debian/dbus.init	2005-10-28 12:36:23 UTC (rev 339)
+++ packages/experimental/dbus/debian/dbus.init	2005-10-28 13:29:15 UTC (rev 340)
@@ -2,6 +2,7 @@
 # -*- coding: utf-8 -*-
 # Debian init.d script for D-BUS
 # Copyright © 2003 Colin Walters <walters at debian.org>
+# Copyright © 2005 Sjoerd Simons <sjoerd at debian.org>
 
 set -e
 
@@ -42,7 +43,7 @@
       rm -f $PIDFILE
     fi
   fi
-  log_begin_msg "Starting $DESC: "
+  log_daemon_msg "Starting $DESC" "$NAME"
   start-stop-daemon --start --quiet --pidfile $PIDFILE \
     --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
   log_end_msg $?
@@ -56,7 +57,7 @@
   if [ -d $EVENTDIR ]; then
       run-parts --reverse --arg=stop $EVENTDIR
   fi
-  log_begin_msg "Stopping $DESC: "
+  log_daemon_msg "Stopping $DESC" "$NAME"
   start-stop-daemon --stop --retry 60 --quiet --oknodo --pidfile $PIDFILE \
     --user $DAEMONUSER
   # We no longer include these arguments so that start-stop-daemon
@@ -67,6 +68,14 @@
   rm -f $PIDFILE
 }
 
+reload_it()
+{
+  log_begin_msg "Reloading $DESC config"
+  dbus-send --system --type=method_call --dest=org.freedesktop.DBus \
+     / org.freedesktop.DBus.ReloadConfig
+  log_end_msg $?
+}
+
 case "$1" in
   start)
     start_it_up
@@ -74,13 +83,16 @@
   stop)
     shut_it_down
   ;;
+  reload)
+    reload_it
+  ;;
   restart|force-reload)
     shut_it_down
     sleep 1
     start_it_up
   ;;
   *)
-    echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
+    echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}" >&2
     exit 1
   ;;
 esac




More information about the Pkg-utopia-commits mailing list