SHA256
1
0
forked from pool/vagrant

Accepting request 690784 from home:dancermak:branches:Virtualization:vagrant

Restructure vagrant package to support system-wide plugin installation

OBS-URL: https://build.opensuse.org/request/show/690784
OBS-URL: https://build.opensuse.org/package/show/Virtualization:vagrant/vagrant?expand=0&rev=30
This commit is contained in:
2019-04-11 18:03:08 +00:00
committed by Git OBS Bridge
parent 03fef27e22
commit 36c791a200
11 changed files with 544 additions and 152 deletions

17
vagrant_post.rb Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/ruby
begin
$LOAD_PATH.unshift "%{vagrant_dir}/lib"
begin
require "vagrant/plugin/manager"
rescue LoadError => e
raise
end;
unless File.exist?("%{vagrant_plugin_conf}")
Vagrant::Plugin::StateFile.new(Pathname.new(File.expand_path "%{vagrant_plugin_conf}")).save!
# File.symlink "%{vagrant_plugin_conf}", "%{vagrant_plugin_conf_link}"
end
rescue => e
puts "Vagrant plugin.json is not properly initialized: #{e}"
end