core: when writing transient unit files, make sure all lines end with a newline

This is a fix-up for 2a9a6f8ac0 which covered
non-transient units, but missed the case for transient units.
This commit is contained in:
Lennart Poettering 2016-06-23 01:29:33 +02:00
parent b09c0bbad8
commit fc40065bcd

View 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;
}