[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dbus and initscripts

Wouter Verhelst wrote:

Currently dbus' initscript, when invoked with the "stop", "start", or
"restart" arguments, will also restart services that depend on dbus. I
think this is broken, but in an IRC discussion, Sjoerd Simons, one of
the maintainers disagreed. My arguments:

There are three cases where an initscript is called:
- At bootup or shutdown. At this point, the initscript should not have
  to care about services depending on dbus, since init itself will then
  take care of it. Additionally, I might want to install something that
  happens to depend on dbus, but not necessarily run it all the time;
  say, I only want to run avahi on networks where it makes sense. The
  current dbus setup makes this impossible.

That is not correct. If e.g. you don't want avahi daemon started by default for runlevel 2, just remove the symlinks from /etc/rc2.d. During bootup/shutdown, the dbus init script will not touch dependent services.

- Stuff is broken, and I want to debug. This debugging might involve
  "stopping and starting services one at a time". The current dbus setup
  makes this impossible.

Why? You can restart dbus, and stop the dependent services manually. After that, you can start them each on its own.
A bit more cumbersome, but not impossible as you say.

- On upgrade. Since apparently dbus-using services die when dbus itself
  is restarted, it might make sense to restart those services too, then.
  However, there is no reason why the initscript, in this case, has to
  use the regular "start" or "stop" targets; by simply using the "-r"
  and "--no-start" dh_installinit options, and then manually adding a
  line to properly restart services (preferably in a similar way to how
  libc6 does it, allowing users to select services that they want to see
  restarted) will properly take care of it.

Basically, the dbus init script provides a workaround for a limitation in our current init system. "Real" dependency based init systems, would automatically shutdown dependend services, if a service is stopped.

Currently, policy does not explicitly say that an initscript should not
restart other services than the one it takes care of by itself, and
Sjoerd suggested that a bug about this would be closed. Since policy
doesn't explicitly support neither mine nor Sjoerd's position, I'm
raising the issue here: what do other people think?

I think, we currently have no better alternative, unfortunately.


Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: