sonic-buildimage/dockers/docker-teamd/teamd.sh
Shuotian Cheng 0f6c8c14e8 [teamd]: Remove deprecated blocking logic before starting teamd (#976)
With the fixes in /etc/network/interfaces file, host interfaces
could be added into the corresponding LAGs automatically. Thus,
the logic of checking if port initialization is ready is no longer
needed.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2017-09-21 14:56:16 -07:00

29 lines
481 B
Bash
Executable File

#!/usr/bin/env bash
TEAMD_CONF_PATH=/etc/teamd
function start_app {
rm -f /var/run/teamd/*
if [ "$(ls -A $TEAMD_CONF_PATH)" ]; then
for f in $TEAMD_CONF_PATH/*; do
teamd -f $f -d
done
fi
teamsyncd &
}
function clean_up {
if [ "$(ls -A $TEAMD_CONF_PATH)" ]; then
for f in $TEAMD_CONF_PATH/*; do
teamd -f $f -k
done
fi
pkill -9 teamsyncd
exit
}
trap clean_up SIGTERM SIGKILL
start_app
read