]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man/systemd.exec: Make EnvironmentFile error conditions more explicit
authorAndrew Halaney <ahalaney@netflix.com>
Mon, 15 Dec 2025 21:47:17 +0000 (15:47 -0600)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Dec 2025 10:56:52 +0000 (11:56 +0100)
It is not entirely clear what happens when EnvironmentFile fails in the
prior wording. With the new wording it should now be clear that if it
fails to process the file the service will fail, and if it is prefixed
with "-" all errors are silently ignored.

Signed-off-by: Andrew Halaney <ahalaney@netflix.com>
man/systemd.exec.xml

index ebf8b1df6a02da539374ef7dd0cb193f97f5897b..87ee2f8d04533cc35e8851966f9bf0d2b4728d6c 100644 (file)
@@ -3195,10 +3195,11 @@ SystemCallErrorNumber=EPERM</programlisting>
         ignored; both the backslash and the following character are preserved verbatim. Leading and trailing
         whitespace outside of the double quotes is discarded.</para>
 
-        <para>The argument passed should be an absolute filename or wildcard expression, optionally prefixed with
-        <literal>-</literal>, which indicates that if the file does not exist, it will not be read and no error or
-        warning message is logged. This option may be specified more than once in which case all specified files are
-        read. If the empty string is assigned to this option, the list of file to read is reset, all prior assignments
+        <para>The argument passed should be an absolute filename or wildcard expression. If the file does not
+        exist, cannot be read, or contains invalid content, the service will fail to start. To make the file
+        optional, prefix the path with <literal>-</literal>, which causes all errors related to the file to be
+        silently ignored. This option may be specified more than once in which case all specified files are read.
+        If the empty string is assigned to this option, the list of files to read is reset, all prior assignments
         have no effect.</para>
 
         <para>The files listed with this directive will be read shortly before the process is executed (more