diff --git a/scripts/vagrant/Vagrantfile b/scripts/vagrant/Vagrantfile index 230495805..2988f6f1d 100644 --- a/scripts/vagrant/Vagrantfile +++ b/scripts/vagrant/Vagrantfile @@ -30,6 +30,12 @@ Vagrant.configure(2) do |config| when "freebsd11" #See: https://app.vagrantup.com/generic/boxes/freebsd11 config.vm.box = "generic/freebsd11" + if File.file?(File.expand_path("~/vagrant_pkg.conf")) + config.vm.provision "file", source: "~/vagrant_pkg.conf", destination: "pkg.conf" + config.vm.provision "shell", inline: "sudo mv pkg.conf /usr/local/etc/pkg.conf" + config.vm.provision "shell", inline: "sudo chown root:wheel /usr/local/etc/pkg.conf" + config.vm.provision "shell", inline: "sudo chmod 644 /usr/local/etc/pkg.conf" + end else "Invalid argument #{distro}" abort("Invalid argument!") diff --git a/scripts/vagrant/create_vbox.sh b/scripts/vagrant/create_vbox.sh index f7a75f650..869a46e90 100755 --- a/scripts/vagrant/create_vbox.sh +++ b/scripts/vagrant/create_vbox.sh @@ -181,6 +181,13 @@ if [ ${DRY_RUN} != 1 ]; then else vagrant plugin install vagrant-proxyconf fi + if echo "$SPDK_VAGRANT_DISTRO" | grep -q freebsd; then + cat >~/vagrant_pkg.conf <