utils/bond2team: keep delivering config to file if stdout not supplied
diff mbox series

Message ID 20200720085256.2105074-1-liuhangbin@gmail.com
State New
Headers show
Series
  • utils/bond2team: keep delivering config to file if stdout not supplied
Related show

Commit Message

Hangbin Liu July 20, 2020, 8:52 a.m. UTC
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>
---
 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:52:56AM CEST, liuhangbin@gmail.com wrote:
>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>

applied, thanks!
Xin Long July 25, 2020, 2:58 a.m. UTC | #2
Hi, Jiri

will you do 1.31 release soon or we will have to wait for a long time?

Thanks.

On Wed, Jul 22, 2020 at 8:49 PM Jiri Pirko <jiri@resnulli.us> wrote:
>
> Mon, Jul 20, 2020 at 10:52:56AM CEST, liuhangbin@gmail.com wrote:
> >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>
>
> applied, thanks!
> _______________________________________________
> libteam mailing list -- libteam@lists.fedorahosted.org
> To unsubscribe send an email to libteam-leave@lists.fedorahosted.org
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedorahosted.org/archives/list/libteam@lists.fedorahosted.org

Patch
diff mbox series

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