Commit 672c73fb authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

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: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476159


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 15021127
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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