Update trace attribute
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 12 Sep 2017 11:12:36 +0000 (13:12 +0200)
committerJohn Crispin <john@phrozen.org>
Thu, 28 Sep 2017 06:26:56 +0000 (08:26 +0200)
When a service is started for the first time without trace
attribute (e.g. during boot), then it was impossible to restart it in
tracing mode (/etc/init.d/service trace). This is fixed here.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
service/instance.c

index dc7e3ca58ad2b1ffed1c8781f4118b658defcece..1760a098347e0705f977b585456bb8979e102ded 100644 (file)
@@ -941,6 +941,7 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr
        in->command = in_src->command;
        in->pidfile = in_src->pidfile;
        in->name = in_src->name;
+       in->trace = in_src->trace;
        in->node.avl.key = in_src->node.avl.key;
 
        free(in->config);