]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rc-local-generator: add comment explaining the background of the generator
authorLennart Poettering <lennart@poettering.net>
Fri, 16 Nov 2018 21:00:35 +0000 (22:00 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 17 Nov 2018 07:43:57 +0000 (08:43 +0100)
This is not obvious, hence it deserves some form of documentation.
However, it's also ultimately an implementation detail, hence let's not
add this to the man page, but as a code comment, that is visible right
at the top of source file.

Fixes: #10675
src/rc-local-generator/rc-local-generator.c

index 44b2edec05de933e208a19f8ac362e189c2f47d9..ba5e336a34f615a87cf4c9bfe4efd49396a56924 100644 (file)
 
 static const char *arg_dest = "/tmp";
 
+/* So you are reading this, and might wonder: why is this implemented as a generator rather than as a plain, statically
+ * enabled service that carries appropriate ConditionFileIsExecutable= lines? The answer is this: conditions bypass
+ * execution of a service's binary, but they have no influence on unit dependencies. Thus, a service that is
+ * conditioned out will still act as synchronization point in the dependency tree, and we'd rather not have that for
+ * these two legacy scripts. */
+
 static int add_symlink(const char *service, const char *where) {
         const char *from, *to;
         int r;