Skip to content

Commit c79d66f

Browse files
committed
core/dbus-service: write PIDFile= setting to transient unit file
Follow-up for a9353a5.
1 parent b8055c0 commit c79d66f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/dbus-service.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,13 @@ static int bus_service_set_transient_property(
340340
if (!UNIT_WRITE_FLAGS_NOOP(flags))
341341
log_unit_notice(u, "Transient unit's PIDFile= property references path below legacy directory /var/run, updating %s → %s; please update client accordingly.", n, z);
342342

343-
free_and_replace(s->pid_file, z);
344-
} else
343+
free_and_replace(n, z);
344+
}
345+
346+
if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
345347
free_and_replace(s->pid_file, n);
348+
unit_write_settingf(u, flags, name, "%s=%s", name, s->pid_file);
349+
}
346350

347351
return 1;
348352
}

0 commit comments

Comments
 (0)