Merge pull request #260 from jefmathiot/master
Moved to Ruby >=1.9 hash syntax to improve readability
This commit is contained in:
commit
28bd6c87ef
2 changed files with 22 additions and 21 deletions
|
@ -36,6 +36,7 @@ module Vagrant
|
|||
opts.separator ""
|
||||
opts.separator "Available subcommands:"
|
||||
|
||||
# REFACTOR Use @subcommands.keys.sort
|
||||
# https://github.com/mitchellh/vagrant/commit/4194da19c60956f6e59239c0145f772be257e79d
|
||||
keys = []
|
||||
@subcommands.each { |key, value| keys << key }
|
||||
|
|
|
@ -56,26 +56,26 @@ module Vagrant
|
|||
|
||||
def commands
|
||||
[
|
||||
{ :cmd => '/usr/bin/lxc-ls', :args => '' },
|
||||
{ :cmd => '/usr/bin/lxc-info', :args => '' },
|
||||
{ :cmd => '/usr/bin/lxc-attach', :args => '' },
|
||||
{ :cmd => '/usr/bin/which', :args => 'lxc-*' },
|
||||
{ :cmd => '/bin/cat', :args => '/var/lib/lxc/*' },
|
||||
{ :cmd => '/bin/mkdir', :args => '/var/lib/lxc/*' },
|
||||
{ :cmd => '/bin/su', :args => "root -c sed -e '*' -ibak /var/lib/lxc/*" },
|
||||
{ :cmd => '/bin/su', :args => "root -c echo '*' >> /var/lib/lxc/*" },
|
||||
{ :cmd => '/usr/bin/lxc-start', :args => '-d --name *' },
|
||||
{ :cmd => '/bin/cp', :args => '%{BOXES}/*/lxc/lxc-template /usr/lib/lxc/templates/*' },
|
||||
{ :cmd => '/bin/cp', :args => '%{BOXES}/*/lxc/lxc-template /usr/share/lxc/templates/*' },
|
||||
{ :cmd => '/bin/rm', :args => '/usr/lib/lxc/templates/*' },
|
||||
{ :cmd => '/bin/rm', :args => '/usr/share/lxc/templates/*' },
|
||||
{ :cmd => '/bin/chmod', :args => '+x /usr/lib/lxc/*' },
|
||||
{ :cmd => '/bin/chmod', :args => '+x /usr/share/lxc/*' },
|
||||
{ :cmd => '/usr/bin/lxc-create', :args => '--template * --name * -- --tarball ${BOXES}/*' },
|
||||
{ :cmd => '/bin/rm', :args => '-rf /var/lib/lxc/*/rootfs/tmp/*' },
|
||||
{ :cmd => '/usr/bin/lxc-shutdown', :args => '--name *' },
|
||||
{ :cmd => '/usr/bin/lxc-stop', :args => '--name *' },
|
||||
{ :cmd => '/usr/bin/lxc-destroy', :args => '--name *' }
|
||||
{ cmd: '/usr/bin/lxc-ls', args: '' },
|
||||
{ cmd: '/usr/bin/lxc-info', args: '' },
|
||||
{ cmd: '/usr/bin/lxc-attach', args: '' },
|
||||
{ cmd: '/usr/bin/which', args: 'lxc-*' },
|
||||
{ cmd: '/bin/cat', args: '/var/lib/lxc/*' },
|
||||
{ cmd: '/bin/mkdir', args: '/var/lib/lxc/*' },
|
||||
{ cmd: '/bin/su', args: "root -c sed -e '*' -ibak /var/lib/lxc/*" },
|
||||
{ cmd: '/bin/su', args: "root -c echo '*' >> /var/lib/lxc/*" },
|
||||
{ cmd: '/usr/bin/lxc-start', args: '-d --name *' },
|
||||
{ cmd: '/bin/cp', args: '%{BOXES}/*/lxc/lxc-template /usr/lib/lxc/templates/*' },
|
||||
{ cmd: '/bin/cp', args: '%{BOXES}/*/lxc/lxc-template /usr/share/lxc/templates/*' },
|
||||
{ cmd: '/bin/rm', args: '/usr/lib/lxc/templates/*' },
|
||||
{ cmd: '/bin/rm', args: '/usr/share/lxc/templates/*' },
|
||||
{ cmd: '/bin/chmod', args: '+x /usr/lib/lxc/*' },
|
||||
{ cmd: '/bin/chmod', args: '+x /usr/share/lxc/*' },
|
||||
{ cmd: '/usr/bin/lxc-create', args: '--template * --name * -- --tarball ${BOXES}/*' },
|
||||
{ cmd: '/bin/rm', args: '-rf /var/lib/lxc/*/rootfs/tmp/*' },
|
||||
{ cmd: '/usr/bin/lxc-shutdown', args: '--name *' },
|
||||
{ cmd: '/usr/bin/lxc-stop', args: '--name *' },
|
||||
{ cmd: '/usr/bin/lxc-destroy', args: '--name *' }
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue