В Wed, 29 Jan 2014 10:16:06 +0100 Thomas Bächler <tho...@archlinux.org> пишет:
> Am 29.01.2014 03:49, schrieb Andrey Borzenkov: > >> Zbyszek's argument for the patch, however, is that following the > >> recommended WantedBy= behavior already applies the same Before= > >> dependency, > > > > Where is *this* documented? Unless I misunderstand what you say. > > The documentation (and code) regarding the sometimes unexpected > behaviour of DefaultDependencies is scattered in a few places - this > cost me some time when I first learned how to systemd. > > From systemd.unit(5): > > If true, (the default), a few default dependencies will implicitly be > > created for the unit. The actual dependencies created depend on the > > unit type. > > Now, it is true that when you look at systemd.service(5) and friends, > there is no mention of this implicit Before= dependency mentioned above. > Even when you look at the code, you won't find it directly. > > Eventually, you'll find this bit in systemd.target(5): > > Unless DefaultDependencies= is set to false, target units will > > implicitly complement all configured dependencies of type Wants=, > > Requires=, RequiresOverridable= with dependencies of type After= if > > the units in question also have DefaultDependencies=true > Ah! of course. Thank you. Somehow amount of documentation in systemd may also become a disadvantage :) > So, in order to understand DefaultDependencies, you need to read the > related bits in systemd.unit(5), systemd.service(5), systemd.timer(5), > systemd.socket(5), systemd.path(5), systemd.slice(5), systemd.swap(5) > and systemd.target(5). The manpages systemd.mount(5) and > systemd.automount(5) seem to lack any information about default > dependencies. > In theory you need just two of them - for two units in question, for which you try to understand why they have these specific relations. > This is really annoying to learn - I'd suggest collecting all this > information in one place - IMO, it belongs either into systemd.unit(5) > or into its own manpage. > Actually I think having default dependency for a unit type in the man page for this unit type is logical. May be some magic to auto-generate cross-reference man page would be nice. Maintaining this manually is too error prone.
signature.asc
Description: PGP signature
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel