From faf5144aa6c87642d627b63a8464a8e96949e9fe Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 28 Feb 2018 18:25:14 +0000 Subject: Ensure the ssh config files are created per distro If 2 jobs for different distros start on the same host, the generated xci-vm-config files might be rewritten by both jobs causing trouble for the other. This change creates ssh config per distro to prevent potential issues. Change-Id: If6c0a86fd51bf3ba920e9206849ed1537894c7e1 Signed-off-by: Fatih Degirmenci --- xci/scripts/vm/start-new-vm.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'xci/scripts/vm') diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index 31c7337e..78d385bd 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -276,18 +276,21 @@ echo "Adding ${VM_NAME} entry to /etc/hosts" sudo sed -i "/.*${VM_NAME}.*/d" /etc/hosts sudo bash -c "echo '${_ip} ${VM_NAME}' >> /etc/hosts" +# remove ssh xci-vm-config that uses none-distro specific filename +/bin/rm -f $HOME/.ssh/xci-vm-config + echo "Dropping a minimal .ssh/config file" -cat > $HOME/.ssh/xci-vm-config< $HOME/.ssh/${OS}-xci-vm-config<