From eb1188c2c88c0b8e6d943ceb84788763f7a42774 Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Sun, 1 Oct 2017 12:37:35 +0200 Subject: [PATCH] Give the testing VM commands and help text --- Vagrantfile | 19 +++++++++++++++++++ devtools/dev-help-testvm.sh | 12 ++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 devtools/dev-help-testvm.sh diff --git a/Vagrantfile b/Vagrantfile index 6c1e371..89ba996 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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 diff --git a/devtools/dev-help-testvm.sh b/devtools/dev-help-testvm.sh new file mode 100644 index 0000000..0961792 --- /dev/null +++ b/devtools/dev-help-testvm.sh @@ -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 +"