From 9c5ac5ebba890cbc75d8b2d35e55aa84d282b0eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 15 Mar 2019 08:19:07 +0100 Subject: [PATCH] man: tell generator writers to provide authorship and source information Our generators always put a comment who generated the file, but we didn't recommend it to others. Let's also strengthen the advice to use SourcePath=. --- man/systemd.generator.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/man/systemd.generator.xml b/man/systemd.generator.xml index 254b0f3181c..c77afda0f21 100644 --- a/man/systemd.generator.xml +++ b/man/systemd.generator.xml @@ -193,12 +193,15 @@ - It is a good idea to use the SourcePath= directive - in generated unit files to specify the source configuration file you are - generating the unit from. This makes things more easily understood by the - user and also has the benefit that systemd can warn the user about - configuration files that changed on disk but have not been read yet by - systemd. + The generator should always include its own name in a comment at the top of the generated file, + so that the user can easily figure out which component created or amended a particular unit. + + The SourcePath= directive should be used in generated files to specify the + source configuration file they are generated from. This makes things more easily understood by the + user and also has the benefit that systemd can warn the user about configuration files that changed + on disk but have not been read yet by systemd. The SourcePath= value does not have + to be a file in a physical filesystem. For example, in the common case of the generator looking at + the kernel command line, should be used. -- 2.47.3