diff options
author | Thom May <thom@chef.io> | 2015-06-25 10:43:19 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2015-06-25 10:43:19 +0100 |
commit | 65f7e4648b04dd403ffabed4eeb4847dc865f34c (patch) | |
tree | 50340e6fc2f4c47af39e96b0db86b6ca78afa01d /lib/chef/knife | |
parent | ab34e3cd83d545b5da19113d723eeebcab1e77e2 (diff) | |
download | chef-65f7e4648b04dd403ffabed4eeb4847dc865f34c.tar.gz |
Fix some errant bashismstm/fix_bashisms
Fixes #3408
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/bootstrap/templates/chef-full.erb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/knife/bootstrap/templates/chef-full.erb b/lib/chef/knife/bootstrap/templates/chef-full.erb index 335b1f181c..b0d7a6e05d 100644 --- a/lib/chef/knife/bootstrap/templates/chef-full.erb +++ b/lib/chef/knife/bootstrap/templates/chef-full.erb @@ -12,7 +12,7 @@ tmp_dir="$tmp/install.sh.$$" (umask 077 && mkdir $tmp_dir) || exit 1 exists() { - if command -v $1 &>/dev/null + if command -v $1 >/dev/null 2>&1 then return 0 else @@ -166,12 +166,12 @@ do_download() { <%= knife_config[:bootstrap_install_command] %> <% else %> install_sh="<%= knife_config[:bootstrap_url] ? knife_config[:bootstrap_url] : "https://www.opscode.com/chef/install.sh" %>" - if ! exists /usr/bin/chef-client; then + if test -f /usr/bin/chef-client; then + echo "-----> Existing Chef installation detected" + else echo "-----> Installing Chef Omnibus (<%= latest_current_chef_version_string %>)" do_download ${install_sh} $tmp_dir/install.sh sh $tmp_dir/install.sh -P chef <%= latest_current_chef_version_string %> - else - echo "-----> Existing Chef installation detected" fi <% end %> |