Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

If available, use system pipework, else bundled. #372

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/vagrant-lxc/command/sudoers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create_wrapper!
'sudoers.rb',
:template_root => Vagrant::LXC.source_root.join('templates').to_s,
:cmd_paths => build_cmd_paths_hash,
:pipework_regex => "#{ENV['HOME']}/\.vagrant\.d/gems/gems/vagrant-lxc.+/scripts/pipework"
:pipework_regex => "\\A" + ( `which pipework`.to_s.strip[/.+/m] || "#{ENV['HOME']}/\\.vagrant\\.d/gems/gems/vagrant-lxc.+/scripts/pipework" )
)
file.puts template.render
end
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-lxc/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def configure_private_network(bridge_name, bridge_ip, container_name, address_ty
end

cmd = [
Vagrant::LXC.source_root.join('scripts/pipework').to_s,
`which pipework`.to_s.strip[/.+/m] || Vagrant::LXC.source_root.join('scripts/pipework').to_s,
bridge_name,
container_name,
ip ||= "dhcp"
Expand Down