Tweaks to get the changes introduced on GH-317 to work with the sudo wrapper
This commit is contained in:
parent
b4a642bc8a
commit
80ca559258
2 changed files with 3 additions and 2 deletions
|
@ -149,8 +149,7 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
def support_version_command?
|
def support_version_command?
|
||||||
@sudo_wrapper.run('which', 'lxc-version')
|
@sudo_wrapper.run('which', 'lxc-version').strip.chomp != ''
|
||||||
return true
|
|
||||||
rescue Vagrant::LXC::Errors::ExecuteError
|
rescue Vagrant::LXC::Errors::ExecuteError
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
|
@ -95,12 +95,14 @@ Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-version'
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-ls'
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-ls'
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-info', '--name', /.*/
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-info', '--name', /.*/
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-create', '-B', /.*/, '--template', /.*/, '--name', /.*/, '**'
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-create', '-B', /.*/, '--template', /.*/, '--name', /.*/, '**'
|
||||||
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-create', '--version'
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-destroy', '--name', /.*/
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-destroy', '--name', /.*/
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-start', '-d', '--name', /.*/, '**'
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-start', '-d', '--name', /.*/, '**'
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-stop', '--name', /.*/
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-stop', '--name', /.*/
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-shutdown', '--name', /.*/
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-shutdown', '--name', /.*/
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-attach', '--name', /.*/, '**'
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-attach', '--name', /.*/, '**'
|
||||||
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-attach', '-h'
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-attach', '-h'
|
||||||
|
Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-config', 'lxc.lxcpath'
|
||||||
|
|
||||||
##
|
##
|
||||||
# Commands from driver/action/remove_temporary_files.rb
|
# Commands from driver/action/remove_temporary_files.rb
|
||||||
|
|
Loading…
Reference in a new issue