From 8f883fee674eaa4c5bfe8d5649c709cb7c42a66f Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Wed, 19 May 2021 02:44:21 +0800 Subject: [PATCH] [macsec]: Bind macsec service to sonic.target (#7642) MACsec service cannot be enabled by "sudo config feature state macsec enabled" Signed-off-by: Ze Gan --- files/build_templates/macsec.service.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/build_templates/macsec.service.j2 b/files/build_templates/macsec.service.j2 index 85229d1aea..b8ffbafcbd 100644 --- a/files/build_templates/macsec.service.j2 +++ b/files/build_templates/macsec.service.j2 @@ -2,6 +2,8 @@ Description=MACsec container Requires=swss.service After=swss.service syncd.service +BindsTo=sonic.target +After=sonic.target StartLimitIntervalSec=1200 StartLimitBurst=3 @@ -14,4 +16,4 @@ Restart=always RestartSec=30 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=sonic.target \ No newline at end of file