
During the Berlin summit, 2018 November, we used an updated version of the training VM, with always-latest devstack running on Ubuntu 18.04 LTS. This patch fixes issues coming with installing devstack on the new operating system, and also introduces some bug fixes. For a full list of changes, refer to CHANGELOG.md Change-Id: I822f68d5aba5721d6eb7dd9066e10dff81bcd736
32 lines
608 B
Bash
Executable File
32 lines
608 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Empty user caches
|
|
set -x
|
|
rm -rf /root/.cache
|
|
rm -rf /home/ubuntu/.cache
|
|
|
|
# Remove compiled pyc files
|
|
updatedb
|
|
count=$(locate -- *.pyc | wc -l)
|
|
i=1
|
|
for pyc in $(locate -- *.pyc); do
|
|
rm -rf "$pyc"
|
|
echo -en "\r$((i++)) of $count deleted"
|
|
done
|
|
echo ""
|
|
updatedb
|
|
|
|
# Empty packages cache
|
|
apt clean
|
|
apt autoclean
|
|
apt update
|
|
|
|
# Disable Console serial port redirection
|
|
sed -i "s/console=ttyS0//g" /etc/default/grub
|
|
sed -i "s/console=ttyS0//g" /etc/default/grub.d/*
|
|
update-grub
|
|
|
|
# Set hostname
|
|
echo "upstream-training" > "/etc/hostname"
|
|
echo "127.0.1.1 upstream-training" >> "/etc/hosts"
|