source: trunk/debathena/config/reactivate/debian/dbus-daemon-launch-helper @ 25609

Revision 25609, 458 bytes checked in by jdreed, 12 years ago (diff)
In reactivate: * Avoid race conditions by inhibiting dbus-daemon-launch-helper during a chroot shutdown (Trac: #1052, probably)
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3if hash schroot >/dev/null 2>&1; then
4    session=$(schroot -l --all-sessions)
5fi
6
7HELPER=/lib/dbus-1.0/dbus-daemon-launch-helper
8[ -x "$HELPER" ] || HELPER="/usr${HELPER}"
9[ -x "$HELPER" ] || logger -t "reactivate" "Can't execute $HELPER"
10
11if [ -n "$session" ] && [ "$(echo "$session" | wc -l)" -eq 1 ] && \
12   ! [ -e /var/run/debathena-inhibit-dbus-helper ]; then
13    exec schroot -r -c "$session" "$HELPER" "$@"
14else
15    exec "$HELPER" "$@"
16fi
Note: See TracBrowser for help on using the repository browser.