diff options
author | Thom May <thom@may.lt> | 2015-06-26 09:28:16 +0100 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-07-06 16:32:13 -0700 |
commit | 2b9e5c11f0273da7d9ba766c585bf94883858717 (patch) | |
tree | 85695307d13be365e5b0066280f08764ff792888 | |
parent | b4584f6bfd50a2d862d0319f8511f6ff16c46bbb (diff) | |
download | chef-2b9e5c11f0273da7d9ba766c585bf94883858717.tar.gz |
Merge pull request #3589 from chef/tm/fix_bashisms
Fix some errant bashisms
-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 %> |