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

Error in call to 'setup' with multiple arguments #279

Open
olgeni opened this issue Jul 2, 2017 · 1 comment
Open

Error in call to 'setup' with multiple arguments #279

olgeni opened this issue Jul 2, 2017 · 1 comment
Labels

Comments

@olgeni
Copy link

olgeni commented Jul 2, 2017

On iohyve 0.7.9 from FreeBSD ports, I tried the following:

iohyve setup pool=rpool net=re0

It will work, but with this output:

[: pool=rpool: unexpected operator

It turns out that ioh-setup has a check in __setup that expands to an incorrect syntax:

     if [ -z "$@" ]; then
            echo "Please specify setup parameters."
            echo "Usage: 'iohyve setup <pool=poolname> [kmod=0|1] [net=iface]'"
            echo "See man page for details."
            exit 1
    fi

Using sh -x you see the following happening:

+ __setup setup 'pool=rpool' 'net=re0'
+ shift 1
+ local 'args=pool=rpool net=re0'
+ local poolval
+ local kmodval
+ local netval
+ [ -z 'pool=rpool' 'net=re0' ]
[: pool=rpool: unexpected operator

"$@" is expanded to multiple arguments and the -z syntax is then broken.

This doesn't seem to affect the setup process.

@pr1ntf pr1ntf added the bug label Jul 3, 2017
@pr1ntf
Copy link
Owner

pr1ntf commented Jul 3, 2017

Thank you for the detailed report and suggested fix! We'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants