trouble with dbus
Alex Smith
alex at alex-smith.me.uk
Mon Apr 9 21:24:19 BST 2007
Alfred Zastrow wrote:
> Hallo list,
>
> what ist the right way to start the dbus-daemon (1.0.2) with upstart?
> I tried a modified script from Alex, looking like this:
>
> > --------------- snipp ---------------------
> > start on started udevtrigger
> >
> > stop on starting shutdown
> >
> > console output
> > service
> >
> > pre-start script
> > if [ ! -d /var/run/dbus ]
> > then
> > mkdir /var/run/dbus
> > fi
> > chown messagebus:messagebus /var/run/dbus
> > end script
> >
> > exec /usr/bin/dbus-daemon --system
> >
> > post-stop script
> > rm -f /var/run/dbus/pid
> > rm -f /var/run/dbus/system_bus_socket
> > end script
> > --------------- snapp --------------------
>
> I tried with and without 'respawn' and with and without 'service' and
> I'm getting up to ten non-functional dbus-daemons (no pid and socket files)
>
> This version seems to work, but I don't think that's the right way...
>
>
> > --------------- snipp ---------------------
> > start on started udevtrigger
> >
> > stop on starting shutdown
> >
> > console output
> > service
> >
> > pre-start script
> > if [ ! -d /var/run/dbus ]
> > then
> > mkdir /var/run/dbus
> > fi
> > chown messagebus:messagebus /var/run/dbus
> > /usr/bin/dbus-daemon --system
> > end script
> >
> > post-stop script
> > killall dbus-daemon
> > rm -f /var/run/dbus/pid
> > rm -f /var/run/dbus/system_bus_socket
> > end script
> > --------------- snapp --------------------
>
>
> Who can help?
>
> regards
> Alfred
>
You need to pass --nofork to dbus, and also the dbus-uuidgen --ensure
line from my script needs to be there. This one should work (I updated
it today):
http://ftp.frugalware.org/pub/other/upstart-jobs/upstart-jobs/etc/event.d/services/dbus
--
Alex Smith
Frugalware Linux developer - http://www.frugalware.org
More information about the upstart-devel
mailing list