2013-03-02 20:36:06 -03:00
|
|
|
require "vagrant-lxc/version"
|
2013-02-28 00:20:54 -03:00
|
|
|
require "vagrant-lxc/plugin"
|
2017-12-11 11:48:19 -05:00
|
|
|
require "vagrant-lxc/sudo_wrapper"
|
2014-03-14 00:24:06 -03:00
|
|
|
|
|
|
|
module Vagrant
|
|
|
|
module LXC
|
|
|
|
def self.source_root
|
|
|
|
@source_root ||= Pathname.new(File.dirname(__FILE__)).join('..').expand_path
|
|
|
|
end
|
2014-04-08 19:58:07 +02:00
|
|
|
|
|
|
|
def self.sudo_wrapper_path
|
2014-09-22 23:07:12 -03:00
|
|
|
"/usr/local/bin/vagrant-lxc-wrapper"
|
2014-04-08 19:58:07 +02:00
|
|
|
end
|
2017-12-11 11:48:19 -05:00
|
|
|
|
|
|
|
def self.sudo_wrapper
|
|
|
|
wrapper = Pathname.new(sudo_wrapper_path).exist? &&
|
|
|
|
sudo_wrapper_path || nil
|
|
|
|
SudoWrapper.new(wrapper)
|
|
|
|
end
|
|
|
|
|
2014-03-14 00:24:06 -03:00
|
|
|
end
|
|
|
|
end
|