Replace the tilde with /tmp

the tilde symbol may cause problem when VMs don't have the same
folder path as the host, replace it with tmp will resolve this
issue.

Change-Id: I14114d018fa9dc9fa332f1e34077f88d75995f21
This commit is contained in:
Weezer Su 2017-01-18 15:27:51 -06:00 committed by Major Hayden
parent 289f884795
commit 93d7492496
2 changed files with 3 additions and 3 deletions

View File

@ -57,13 +57,13 @@ done
# Ensure that all running VMs have an updated apt-cache with keys
for node in $(get_all_hosts); do
ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mkdir -p /tmp/keys"
for i in /etc/apt/apt.conf.d/00-nokey /etc/apt/sources.list ~/sources.list /etc/apt/sources.list.d/* /tmp/keys/*; do
for i in /etc/apt/apt.conf.d/00-nokey /etc/apt/sources.list /tmp/sources.list /etc/apt/sources.list.d/* /tmp/keys/*; do
if [[ -f "$i" ]]; then
scp "$i" "10.0.0.${node#*":"}:$i"
fi
done
if [[ "14.04" != "$(lsb_release -sr)" ]]; then
ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mv ~/sources.list /etc/apt/sources.list"
ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mv /tmp/sources.list /etc/apt/sources.list"
fi
ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "(for i in /tmp/keys/*; do \
apt-key add \$i; \

View File

@ -108,7 +108,7 @@ deb [arch=i386] http://archive.ubuntu.com/ubuntu trusty-backports main universe
deb [arch=i386] http://archive.ubuntu.com/ubuntu trusty-security main universe
EOF
cat > ~/sources.list <<EOF
cat > /tmp/sources.list <<EOF
# Faster likely unsigned repo
deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial main universe
deb [arch=amd64] http://mirror.rackspace.com/ubuntu xenial-updates main universe