Give the testing VM commands and help text

This commit is contained in:
Benjamin Sago 2017-10-01 12:37:35 +02:00
parent a739299583
commit eb1188c2c8
2 changed files with 31 additions and 0 deletions

19
Vagrantfile vendored
View File

@ -574,5 +574,24 @@ Vagrant.configure(2) do |config|
set -xe
apt-get install -qq -o=Dpkg::Use-Pty=0 -y unzip
EOF
# This thing also has its own welcoming text.
config.vm.provision :shell, privileged: true, inline: <<-EOF
rm -f /etc/update-motd.d/*
# Capture the help text so it gets displayed first
bash /vagrant/devtools/dev-help-testvm.sh > /etc/motd
# Disable last login date in sshd
sed -i '/PrintLastLog yes/c\PrintLastLog no' /etc/ssh/sshd_config
systemctl restart sshd
EOF
# Make the checker script a command.
config.vm.provision :shell, privileged: true, inline: <<-EOF
set -xe
echo -e "#!/bin/sh\nbash /vagrant/devtools/dev-download-and-check-release.sh \"\\$*\"" > /usr/bin/check-release
chmod +x /usr/bin/check-release
EOF
end
end

View File

@ -0,0 +1,12 @@
# This file is like the other one, except for the testing VM.
# It also gets dumped into /etc/motd.
echo -e "
\033[1;33mThe exa testing environment!\033[0m
This machine is dependency-free, and can be used to test that
released versions of exa still work on vanilla Linux installs.
\033[4mCommands\033[0m
\033[32;1mcheck-release\033[0m to download and verify released binaries
"