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>
diff --git a/utils/bond2team b/utils/bond2team
index fc81c4b..28733da 100755
--- a/utils/bond2team
+++ b/utils/bond2team
@@ -623,7 +623,7 @@
team_ifcfg_deliver()
{
pr_dbg "${FUNCNAME} $*"
- if ! to_stdout; then
+ if to_stdout; then
return 0
fi