diff options
| author | Martin André <m.andre@redhat.com> | 2016-10-20 18:11:26 +0200 |
|---|---|---|
| committer | Martin André <m.andre@redhat.com> | 2016-10-27 18:24:50 +0200 |
| commit | 193a8190ce16d6b356957d77c81c78eaed20d962 (patch) | |
| tree | c04de92ea836c4678dc96b61e4713ad09dda0d53 /contrib/dev | |
| parent | 4003763cbe79c23d75dda191c7a9a16edb71e37a (diff) | |
| download | kolla-ansible-193a8190ce16d6b356957d77c81c78eaed20d962.tar.gz kolla-ansible-193a8190ce16d6b356957d77c81c78eaed20d962.zip | |
Fix broken test in vagrant boostrap script
The file path was not properly passed to the '-x' test which caused it
to always return true.
This commit simplifies the test for existing command by relying only on
the exit code of `type` rather than checking that the file path is
executable.
Change-Id: Iaf47d92ff9fd1ef34d8d7492c08ec24d2b8a9536
Closes-Bug: #1635341
Diffstat (limited to 'contrib/dev')
| -rw-r--r-- | contrib/dev/vagrant/bootstrap.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/dev/vagrant/bootstrap.sh b/contrib/dev/vagrant/bootstrap.sh index ec89440b8..b9ac831bc 100644 --- a/contrib/dev/vagrant/bootstrap.sh +++ b/contrib/dev/vagrant/bootstrap.sh @@ -24,13 +24,13 @@ REGISTRY=${REGISTRY_URL}:${REGISTRY_PORT} ADMIN_PROTOCOL="http" function _ensure_lsb_release { - if [[ -x $(type lsb_release 2>/dev/null) ]]; then + if type lsb_release >/dev/null 2>&1; then return fi - if [[ -x $(type apt-get 2>/dev/null) ]]; then + if type apt-get >/dev/null 2>&1; then apt-get -y install lsb-release - elif [[ -x $(type yum 2>/dev/null) ]]; then + elif type yum >/dev/null 2>&1; then yum -y install redhat-lsb-core fi } |
