50 lines
1.4 KiB
Diff
50 lines
1.4 KiB
Diff
|
From 7000b5bcb22e8192bbc6d9ceddba740541c68484 Mon Sep 17 00:00:00 2001
|
||
|
Message-Id: <7000b5bcb22e8192bbc6d9ceddba740541c68484.1596613046.git.lucien.xin@gmail.com>
|
||
|
From: Hangbin Liu <liuhangbin@gmail.com>
|
||
|
Date: Mon, 20 Jul 2020 16:52:56 +0800
|
||
|
Subject: [PATCH 1/2] utils/bond2team: keep delivering config to file if stdout
|
||
|
not supplied
|
||
|
|
||
|
When --stdout not supplied, we should keep on delivering the config file
|
||
|
instead of return.
|
||
|
|
||
|
Before the fix:
|
||
|
$ bond2team --configdir ./bonding/ --master bond0 --rename team0
|
||
|
$ bond2team --configdir bonding/ --outputdir teaming/ --master bond0 --rename team0
|
||
|
$ ls teaming/
|
||
|
|
||
|
After the fix:
|
||
|
$ bond2team --configdir ./bonding/ --master bond0 --rename team0
|
||
|
Resulted files:
|
||
|
/tmp/bond2team.nV4eX3/ifcfg-team0
|
||
|
/tmp/bond2team.nV4eX3/ifcfg-eth1
|
||
|
/tmp/bond2team.nV4eX3/ifcfg-eth2
|
||
|
|
||
|
$ bond2team --configdir bonding/ --outputdir teaming/ --master bond0 --rename team0
|
||
|
$ ls teaming/
|
||
|
ifcfg-eth1 ifcfg-eth2 ifcfg-team0
|
||
|
|
||
|
Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool")
|
||
|
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
|
||
|
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
||
|
---
|
||
|
utils/bond2team | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/utils/bond2team b/utils/bond2team
|
||
|
index fc81c4b..28733da 100755
|
||
|
--- a/utils/bond2team
|
||
|
+++ b/utils/bond2team
|
||
|
@@ -623,7 +623,7 @@ team_ifcfg_write()
|
||
|
team_ifcfg_deliver()
|
||
|
{
|
||
|
pr_dbg "${FUNCNAME} $*"
|
||
|
- if ! to_stdout; then
|
||
|
+ if to_stdout; then
|
||
|
return 0
|
||
|
fi
|
||
|
|
||
|
--
|
||
|
2.18.1
|
||
|
|