Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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

edwardbadboy
Copy link
Contributor

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

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>
@erikfrey
Copy link
Owner

erikfrey commented Jan 2, 2013

Good catch, thanks!

erikfrey added a commit that referenced this pull request Jan 2, 2013
fix expansion of the $hosts variable
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants