Skip to content

Commit

Permalink
use color in messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Nov 3, 2015
1 parent 306e4a8 commit a1380f5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples/simple/files/etc/rc.local/FAISERVER
Expand Up @@ -3,6 +3,11 @@
# setup script that is only run once at boot time
# set up an FAI install server

NORMAL=`$TPUT sgr0`
RED=`$TPUT setaf 1`
GREEN=`$TPUT setaf 2`


set -o pipefail

echo "=================================" >/dev/console
Expand Down Expand Up @@ -41,14 +46,14 @@ if [ $? -eq 0 ]; then
rm /var/tmp/base.tar.xz
echo ""
echo "================================================" >/dev/console
echo "Setting up the FAI server was successful" >/dev/console
echo "Setting up the FAI server was ${GREEN}successful${NORMAL}" >/dev/console
echo "================================================" >/dev/console
echo ""
sleep 10
else
echo ""
echo "==================================================" >/dev/console
echo "ERROR: Setting up the FAI install server FAILED!" >/dev/console
echo "${RED}ERROR${NORMAL}: Setting up the FAI install server ${RED}FAILED$NORMAL}!" >/dev/console
echo "Read /var/log/fai/fai-setup.log for more debugging" >/dev/console
echo "==================================================" >/dev/console
echo ""
Expand Down

0 comments on commit a1380f5

Please sign in to comment.