From 88078fe897739700a8252d1399409e911a5831ee Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Mon, 24 Sep 2018 17:01:49 +0000 Subject: [PATCH] [hwsku-init] Introduce mechanism to run HWSKU specific initialization code When there is HWSKU specific initialization needs to be performed, please add hwsku-init script under device folder, it will be invoked by swss before any subsequent initializations. Signed-off-by: Ying Xie --- dockers/docker-orchagent/start.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dockers/docker-orchagent/start.sh b/dockers/docker-orchagent/start.sh index 0321bf8428f4..1b6b8e7959bf 100755 --- a/dockers/docker-orchagent/start.sh +++ b/dockers/docker-orchagent/start.sh @@ -6,6 +6,11 @@ sonic-cfggen -d -t /usr/share/sonic/templates/switch.json.j2 > /etc/swss/config. sonic-cfggen -d -t /usr/share/sonic/templates/ipinip.json.j2 > /etc/swss/config.d/ipinip.json sonic-cfggen -d -t /usr/share/sonic/templates/ports.json.j2 > /etc/swss/config.d/ports.json +# Executed HWSKU specific initialization tasks. +if [ -x /usr/share/sonic/hwsku/hwsku-init ]; then + /usr/share/sonic/hwsku/hwsku-init +fi + export platform=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform` rm -f /var/run/rsyslogd.pid