c93c008bae
This reverts commit a6edef2fa5
.
The reason to revert this commit is that it breaks the current nightly test as
no port channel interfaces are get created after boot. teamd failed to start and
complained about 'Cannot allocate memory' possibly due to nlmsg_alloc function
failure.
Will revert this commit to investigate it further before moving to supervisor.
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
29 lines
481 B
Bash
Executable File
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
|