Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaning up omnibus usage to link embedded bin, ruby into default $PA…

…THs, rather than use /etc/environment to try tweaking (doesn't hit a large number of programs)
  • Loading branch information...
commit 452a9369dbc99f98fef60871fa0acf00867be922 1 parent f947902
@temujin9 temujin9 authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 lib/chef/knife/bootstrap/ubuntu12.04-ironfan.erb
View
13 lib/chef/knife/bootstrap/ubuntu12.04-ironfan.erb
@@ -44,15 +44,12 @@ if [ ! -f /opt/chef/bin/chef-client ]; then
curl -L http://www.opscode.com/chef/install.sh | sudo bash
fi
-# Include the omnibus' path in the system-wide path, to allow use of
-# its executables (gem, ruby, bundler, etc.)
-(
-cat <<'EOP'
-PATH="/opt/chef/embedded/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
-EOP
-) >> /etc/environment
-. /etc/environment
+# Replace /usr/local/sbin with the omnibus' bin, to get it into the PATH
+mv /usr/local/sbin{,~}
+ln -s /opt/chef/embedded/bin /usr/local/sbin
+# Link ruby into /usr/bin/ruby, to allow /usr/bin/env
+ln -s /opt/chef/embedded/bin/ruby /usr/bin
gem install extlib bundler json right_aws pry fog
Please sign in to comment.
Something went wrong with that request. Please try again.