scripts/vagrant: fix tsocks.conf provisioning for Ubuntu
There is no "wheel" group on Ubuntu distros. Chown command caused Vagrantfile to fail. While at it - put the whole bash command flow into a variable and run it as part of single "shell" provision step instead of doing it in three steps. Change-Id: I2853d4176f66f07f1762b339b20ced3386486f87 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476159 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
1502112764
commit
672c73fb12
10
scripts/vagrant/Vagrantfile
vendored
10
scripts/vagrant/Vagrantfile
vendored
@ -72,10 +72,14 @@ Vagrant.configure(2) do |config|
|
||||
|
||||
# Copy the tsocks configuration file for use when installing some spdk test pool dependencies
|
||||
if File.file?("/etc/tsocks.conf")
|
||||
$tsocks_copy = <<-SCRIPT
|
||||
sudo -s
|
||||
mv -f tsocks.conf /etc/tsocks.conf
|
||||
chown root /etc/tsocks.conf
|
||||
chmod 644 /etc/tsocks.conf
|
||||
SCRIPT
|
||||
config.vm.provision "file", source: "/etc/tsocks.conf", destination: "tsocks.conf"
|
||||
config.vm.provision "shell", inline: "sudo mv tsocks.conf /etc/tsocks.conf"
|
||||
config.vm.provision "shell", inline: "sudo chown root:wheel /etc/tsocks.conf"
|
||||
config.vm.provision "shell", inline: "sudo chmod 644 /etc/tsocks.conf"
|
||||
config.vm.provision "shell", inline: $tsocks_copy
|
||||
end
|
||||
|
||||
# vagrant-cachier caches apt/yum etc to speed subsequent
|
||||
|
Loading…
x
Reference in New Issue
Block a user