diff mbox series

utils/bond2team: remove TYPE in ifcfg file

Message ID 20200720085321.2107880-1-liuhangbin@gmail.com (mailing list archive)
State New
Headers show
Series utils/bond2team: remove TYPE in ifcfg file | expand

Commit Message

Hangbin Liu July 20, 2020, 8:53 a.m. UTC
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>
---
 utils/bond2team | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jiri Pirko July 22, 2020, 12:32 p.m. UTC | #1
Mon, Jul 20, 2020 at 10:53:21AM CEST, liuhangbin@gmail.com wrote:
>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>

applied, thanks.
diff mbox series

Patch

diff --git a/utils/bond2team b/utils/bond2team
index 28733da..2aae3f5 100755
--- a/utils/bond2team
+++ b/utils/bond2team
@@ -331,7 +331,7 @@  vfile_load_ifcfg()
 	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"
 }