Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Andraž Levstik (6eeefe34d720e9cec013c5abf3e690581fad6e49)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andraž Levstik <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Andraž Levstik (6eeefe34d720e9cec013c5abf3e690581fad6e49)
  • Date: Sat, 28 Feb 2009 08:50:47 -0600

GIT changes to master grimoire by Andraž Levstik <ruskie AT codemages.net>:

utils/dbus/HISTORY | 6 ++++++
utils/dbus/init.d/smgl-messagebus | 29 +++++++++++++++++++----------
2 files changed, 25 insertions(+), 10 deletions(-)

New commits:
commit 3cc87d8a7c7905024fdf966d2c7d08907b70c2bf
Author: Andraž Levstik <ruskie AT codemages.net>
Commit: Andraž Levstik <ruskie AT codemages.net>

dbus: updated init script to be more resiliant to bad shutdowns

diff --git a/utils/dbus/HISTORY b/utils/dbus/HISTORY
index 494867a..83e0b48 100644
--- a/utils/dbus/HISTORY
+++ b/utils/dbus/HISTORY
@@ -1,3 +1,9 @@
+2009-02-28 Andraž "ruskie" Levstik <ruskie AT mages.ath.cx>
+ * init.d/smgl-messagebus: made it more resiliant and actually
+ fail if it can't start instead of always succeeding and thus
+ blocking hal indefinetly like I had happen quite a few times
+ on bad shutdowns
+
2009-01-10 Vlad Glagolev <stealth AT sourcemage.org>
* FINAL: added, for the notes about the non-DEish WMs

diff --git a/utils/dbus/init.d/smgl-messagebus
b/utils/dbus/init.d/smgl-messagebus
index 073f159..fbc4551 100755
--- a/utils/dbus/init.d/smgl-messagebus
+++ b/utils/dbus/init.d/smgl-messagebus
@@ -3,6 +3,7 @@
PROGRAM=/usr/bin/dbus-daemon
ARGS="--system"
RUNLEVEL=3
+NEEDS="+remote_fs"
PIDFILE=/var/run/dbus/pid

. /etc/init.d/smgl_init
@@ -10,17 +11,25 @@ PIDFILE=/var/run/dbus/pid
start() {
echo "Starting system message bus..."
mkdir -p /var/run/dbus
- if test ! -f $PIDFILE; then
- # don't use loadproc here, as that fails if some user is running
- # a session bus
- $PROGRAM $ARGS
- evaluate_retval
- echo "Creating dbus machine uuid..."
- /usr/bin/dbus-uuidgen --ensure
- evaluate_retval
- else
- print_status warning "$PIDFILE exists, messagebus is running or has
crashed"
+ # make sure there is actually a process there...
+ if [ -f $PIDFILE ]; then
+ echo "Found $PIDFILE doing extra checks..."
+ if ! ps ax | grep "dbus-daemon" | grep -q $(cat /var/run/dbus/pid) ; then
+ print_status warning "$PIDFILE exists, but messagebus is not running
under this PID"
+ echo "Attempting cleanup and new startup..."
+ rm -f $PIDFILE
+ else
+ echo "Seems to be running..."
+ return 0
+ fi
fi
+ # don't use loadproc here, as that fails if some user is running
+ # a session bus
+ $PROGRAM $ARGS
+ evaluate_retval
+ echo "Creating dbus machine uuid..."
+ /usr/bin/dbus-uuidgen --ensure
+ evaluate_retval
}

stop() {



  • [SM-Commit] GIT changes to master grimoire by Andraž Levstik (6eeefe34d720e9cec013c5abf3e690581fad6e49), Andraž Levstik, 02/28/2009

Archive powered by MHonArc 2.6.24.

Top of Page