Skip to content

Commit f7988b0

Browse files
[202205] [timer.unit.j2] use wanted-by in timer unit (#2561)
- What I did I fixed the timer unit template to account "wanted-by" option in the manifest. In case service is delayed, "wanted-by" is applied to the timer unit that delays it. - How I did it I updated timer.unit.j2 template - How to verify it Make sure that "WantedBy" is rendered in the timer unit. Signed-off-by: Stepan Blyschak <[email protected]>
1 parent f45dcfb commit f7988b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sonic-utilities-data/templates/timer.unit.j2

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ Unit={{ manifest.service.name }}{% if multi_instance %}@%i{% endif %}.service
1313

1414
[Install]
1515
WantedBy=timers.target sonic.target
16+
{%- for service in manifest.service["wanted-by"] %}
17+
WantedBy={{ service }}{% if multi_instance and service in multi_instance_services %}@%i{% endif %}.service
18+
{%- endfor %}
19+

0 commit comments

Comments
 (0)