Browse Source

Build custom MOTD

Hamilton Turner 11 years ago
parent
commit
2a3c23c549
2 changed files with 20 additions and 2 deletions
  1. 5 2
      toolset/deployment/vagrant/bootstrap.sh
  2. 15 0
      toolset/deployment/vagrant/custom_motd.sh

+ 5 - 2
toolset/deployment/vagrant/bootstrap.sh

@@ -45,8 +45,11 @@ if [ ! -e "/home/vagrant/.firstboot" ]; then
   toolset/run-tests.py --verbose --install all --test ''
 
   # Setup a nice welcome message for our guest
-  rm /etc/motd
-cat | sudo tee /etc/motd <<EOF
+  sudo rm /etc/update-motd.d/51-cloudguest
+  sudo rm /etc/update-motd.d/98-cloudguest
+  sudo cp /vagrant/custom_motd.sh /etc/update-motd.d/55-tfbwelcome
+
+cat | sudo tee /etc/update-motd.d/05-tfbwelcome <<EOF
   Welcome to the FrameworkBenchmarks project!
 
   To get started, perhaps try this: 

+ 15 - 0
toolset/deployment/vagrant/custom_motd.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+echo "$(tput setaf 4)"
+echo "Welcome to the FrameworkBenchmarks project!"
+echo ""
+echo "  To get started, perhaps try this:"
+echo "    \$ cd FrameworkBenchmarks"
+echo "    \$ toolset/run-tests.py --install server --test go"
+echo "    \$ cat results/ec2/latest/logs/go/out.txt"
+echo ""
+echo "  You can get lots of help:"
+echo "    \$ toolset/run-tests.py --help"
+echo ""
+echo "  This Vagrant environment is already setup and ready to go, so you"
+printf "  can safely ignore any flags about users, hosts, or identity files $(tput sgr 0)"