diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-02-06 17:44:59 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-02-06 17:58:40 +0100 |
commit | c79d66fc7ef0ac10ba0657c2cf4041785fbba0dc (patch) | |
tree | 59c5ac9a9dd925dcef6bf2a07c15c65f733ad202 /src/core/dbus-service.c | |
parent | b8055c05e256ccd35ce115864725bfee73b22731 (diff) | |
download | systemd-c79d66fc7ef0ac10ba0657c2cf4041785fbba0dc.tar.gz |
core/dbus-service: write PIDFile= setting to transient unit file
Follow-up for a9353a5c5b512f107955e56a9812724f40b841d3.
Diffstat (limited to 'src/core/dbus-service.c')
-rw-r--r-- | src/core/dbus-service.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c index ec61ea2772..10470a3f70 100644 --- a/src/core/dbus-service.c +++ b/src/core/dbus-service.c @@ -340,9 +340,13 @@ static int bus_service_set_transient_property( if (!UNIT_WRITE_FLAGS_NOOP(flags)) 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); - free_and_replace(s->pid_file, z); - } else + free_and_replace(n, z); + } + + if (!UNIT_WRITE_FLAGS_NOOP(flags)) { free_and_replace(s->pid_file, n); + unit_write_settingf(u, flags, name, "%s=%s", name, s->pid_file); + } return 1; } |