diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-05-25 23:29:36 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-06-01 00:36:01 +0200 |
commit | 39366733c3fe943363566756e2e152c45a1b3cb2 (patch) | |
tree | 228b0735896af90ca78151c9a69aa3efd12c8cae /patches/source/dbus/rc.messagebus | |
parent | d31c50870d0bee042ce660e445c9294a59a3a65b (diff) | |
download | current-39366733c3fe943363566756e2e152c45a1b3cb2.tar.gz |
Fri May 25 23:29:36 UTC 201814.2
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.2.txz: Rebuilt.
Handle removal of US/Pacific-New timezone. If we see that the machine is
using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/dbus/rc.messagebus')
-rw-r--r-- | patches/source/dbus/rc.messagebus | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/patches/source/dbus/rc.messagebus b/patches/source/dbus/rc.messagebus new file mode 100644 index 00000000..9a1ffce9 --- /dev/null +++ b/patches/source/dbus/rc.messagebus @@ -0,0 +1,81 @@ +#!/bin/sh +# +# messagebus: The D-BUS systemwide message bus +# +# description: This is a daemon which broadcasts notifications of system events \ +# and other messages. See http://www.freedesktop.org/software/dbus/ +# +# processname: dbus-daemon + +# This is a modified version of the rc.messagebus script distributed with the +# dbus sources. Thanks to Don Tanner of the GWare <http://gware.org> Project +# for most of the work involved --Robby Workman <rworkman@slackware.com> + + +PIDFILE=/var/run/dbus/dbus.pid + +start() { + mkdir -p $(dirname $PIDFILE) + if ! ps -u messagebus -c | grep -wq dbus-daemon; then + rm -f $(dirname $PIDFILE)/* + if [ -x /usr/bin/dbus-uuidgen -a -x /usr/bin/dbus-daemon ] ; then + echo "Starting system message bus: /usr/bin/dbus-uuidgen --ensure ; /usr/bin/dbus-daemon --system" + /usr/bin/dbus-uuidgen --ensure + /usr/bin/dbus-daemon --system 1> /dev/null + fi + fi +} + +stop() { + if [ -e "$PIDFILE" ]; then + echo "Stopping system message bus..." + pid=$(cat $PIDFILE) + kill $pid 1> /dev/null 2> /dev/null + # Just in case: + killall dbus-daemon 1> /dev/null 2> /dev/null + rm -f $PIDFILE + fi +} + +reload() { + echo "Reloading system message bus configuration..." + if [ -e "$PIDFILE" ]; then + pid=$(cat $PIDFILE) + kill -HUP $pid + else + killall -HUP dbus-daemon + fi +} + +status() { + if ps -u messagebus -c | grep -wq dbus-daemon; then + echo "System dbus-daemon is running." + else + echo "System dbus-daemon is stopped." + fi +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + echo "You may need to restart your Window Manager to reconnect to the system dbus." + ;; + reload) + reload + ;; + status) + status + ;; + *) + echo $"Usage: $0 {start|stop|restart|reload|status}" + ;; +esac + |