utils/bond2team: remove TYPE in ifcfg file
When convert Bond config to Team, TYPE is used for Bond and DEVICETYPE
is used for Team. So we should remove TYPE keyword in ifcfg file.
Before the fix:
$ ls bonding/
ifcfg-bond0 ifcfg-bond0-eth1 ifcfg-bond0-eth2
$ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE
TYPE=Bond
DEVICETYPE="Team"
TYPE=Ethernet
DEVICETYPE="TeamPort"
TYPE=Ethernet
DEVICETYPE="TeamPort"
Afther the fix:
$ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE
DEVICETYPE="Team"
DEVICETYPE="TeamPort"
DEVICETYPE="TeamPort"
Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
diff --git a/utils/bond2team b/utils/bond2team
index 28733da..2aae3f5 100755
--- a/utils/bond2team
+++ b/utils/bond2team
@@ -331,7 +331,7 @@
oIFS="$IFS"
IFS=$'\n'
VFILE=( $(LANG=C \
- grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|DEVICETYPE\|TEAM' \
+ grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|TYPE\|DEVICETYPE\|TEAM' \
$ifcfg ))
IFS="$oIFS"
}