File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
TEAMD_CONF_PATH=/etc/teamd
4
4
5
- # Before teamd could automatically add newly created host interfaces into the
6
- # LAG, this workaround will be needed. It will remove the obsolete files and
7
- # net devices that are failed to be removed in the previous run.
8
5
function start_app {
9
- # Remove *.pid and *.sock files if there are any
10
6
rm -f /var/run/teamd/*
11
- if [ -d $TEAMD_CONF_PATH ]; then
7
+ if [ " $( ls -A $TEAMD_CONF_PATH ) " ]; then
12
8
for f in $TEAMD_CONF_PATH /* ; do
13
- # Remove netdevs if there are any
14
- intf=` echo $f | awk -F' [/.]' ' {print $4}' `
15
- ip link del $intf
16
9
teamd -f $f -d
17
10
done
18
11
fi
19
12
teamsyncd &
20
13
}
21
14
22
15
function clean_up {
23
- pkill -9 teamd
16
+ if [ " $( ls -A $TEAMD_CONF_PATH ) " ]; then
17
+ for f in $TEAMD_CONF_PATH /* ; do
18
+ teamd -f $f -k
19
+ done
20
+ fi
24
21
pkill -9 teamsyncd
25
22
exit
26
23
}
You can’t perform that action at this time.
0 commit comments