Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion files/build_templates/swss.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Before=ntp-config.service
[Service]
User=root
Environment=sonic_asic_platform={{ sonic_asic_platform }}
ExecStart=/usr/local/bin/swss.sh start
ExecStartPre=/usr/local/bin/swss.sh start
ExecStart=/usr/local/bin/swss.sh attach
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use wait

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline that we should open a separate PR to change over to docker wait

ExecStop=/usr/local/bin/swss.sh stop

[Install]
Expand Down
4 changes: 3 additions & 1 deletion files/build_templates/syncd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ After=opennsl-modules.service
{% elif sonic_asic_platform == 'nephos' %}
After=nps-modules-4.9.0-8-2-amd64.service
{% endif %}
After=swss.service
Before=ntp-config.service

[Service]
User=root
Environment=sonic_asic_platform={{ sonic_asic_platform }}
ExecStart=/usr/local/bin/syncd.sh start
ExecStartPre=/usr/local/bin/syncd.sh start
ExecStart=/usr/local/bin/syncd.sh attach
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use wait

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline that we should open a separate PR to change over to docker wait

ExecStop=/usr/local/bin/syncd.sh stop

[Install]
Expand Down
7 changes: 5 additions & 2 deletions files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ start() {
if [[ x"$WARM_BOOT" != x"true" ]]; then
/bin/systemctl start ${PEER}
fi
}

attach() {
/usr/bin/${SERVICE}.sh attach
}

Expand All @@ -134,11 +137,11 @@ stop() {
}

case "$1" in
start|stop)
start|attach|stop)
$1
;;
*)
echo "Usage: $0 {start|stop}"
echo "Usage: $0 {start|attach|stop}"
exit 1
;;
esac
7 changes: 5 additions & 2 deletions files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ start() {
debug "Started ${SERVICE} service..."

unlock_service_state_change
}

attach() {
/usr/bin/${SERVICE}.sh attach
}

Expand Down Expand Up @@ -165,11 +168,11 @@ stop() {
}

case "$1" in
start|stop)
start|attach|stop)
$1
;;
*)
echo "Usage: $0 {start|stop}"
echo "Usage: $0 {start|attach|stop}"
exit 1
;;
esac