Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fix expansion of the $hosts variable #4

Merged
merged 1 commit into from Jan 2, 2013

Conversation

Projects
None yet
2 participants
Contributor

edwardbadboy commented Aug 17, 2012

if value of $hosts contains spaces, which can be defined by
br -m "host1 host2", bash will expand it as is. So
"if [ -z $hosts ]" is expanded to "if [ -z host1 host2 ]", this is
wrong. This commit add quotes to the $hosts variable, so it is expanded
correctly.

Signed-off-by: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com

@edwardbadboy edwardbadboy fix expansion of the $hosts variable
if value of $hosts contains spaces, which can be defined by
br -m "host1 host2", bash will expand it as is. So
"if [ -z $hosts ]" is expanded to "if [ -z host1 host2 ]", this is
wrong. This commit add quotes to the $hosts variable, so it is expanded
correctly.

Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
7a9ff00
Owner

erikfrey commented Jan 2, 2013

Good catch, thanks!

@erikfrey erikfrey added a commit that referenced this pull request Jan 2, 2013

@erikfrey erikfrey Merge pull request #4 from edwardbadboy/fixexpanding
fix expansion of the $hosts variable
31abc86

@erikfrey erikfrey merged commit 31abc86 into erikfrey:master Jan 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment