]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: when writing transient unit files, make sure all lines end with a newline
authorLennart Poettering <lennart@poettering.net>
Wed, 22 Jun 2016 23:29:33 +0000 (01:29 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 22 Jun 2016 23:29:33 +0000 (01:29 +0200)
This is a fix-up for 2a9a6f8ac04a69ca36d645f9305a33645f22a22b which covered
non-transient units, but missed the case for transient units.

src/core/unit.c

index 581962eba658564ea9ade9cb237237f1cd1d34bd..0a1a5321df111d3a641c9cc8722082ad9e5408bc 100644 (file)
@@ -3364,6 +3364,7 @@ int unit_write_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name, co
                 /* When this is a transient unit file in creation, then let's not create a new drop-in but instead
                  * write to the transient unit file. */
                 fputs(data, u->transient_file);
+                fputc('\n', u->transient_file);
                 return 0;
         }