vagrant-lxc-wrapper: Use correct ruby interpreter

Previously, we hardcoded to using the ruby binary in /opt/vagrant[..].
On some systems, this path is incorrect, so instead we use the
path of the interpreter that is executing the `vagrant lxc sudoers`
command.
This commit is contained in:
Luke Faraone 2015-03-19 16:21:57 -07:00
parent c9cd671a32
commit 05fdb3e000
2 changed files with 2 additions and 1 deletions

View file

@ -83,6 +83,7 @@ module Vagrant
hash[cmd] = `which #{cmd}`.strip
end
hash['lxc_bin'] = Pathname(`which lxc-create`.strip).parent.to_s
hash['ruby'] = Gem.ruby
end
end
end

View file

@ -1,4 +1,4 @@
#!/opt/vagrant/embedded/bin/ruby
#!<%= cmd_paths['ruby'] %>
# Automatically created by vagrant-lxc
class Whitelist