From 86026de8ef8cf4c43f84c20ca3a0e9bd3bfb2242 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:29 -0400 Subject: [PATCH] Adjust colour scheme of MOTD --- roles/base/templates/usr/local/sbin/update-motd.sh.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/base/templates/usr/local/sbin/update-motd.sh.j2 b/roles/base/templates/usr/local/sbin/update-motd.sh.j2 index dcbf746..260ae7a 100755 --- a/roles/base/templates/usr/local/sbin/update-motd.sh.j2 +++ b/roles/base/templates/usr/local/sbin/update-motd.sh.j2 @@ -11,7 +11,7 @@ DEBVER="$( grep 'PRETTY_NAME=' /etc/os-release | awk -F'"' '{ print $2 }' )" echo >> $TMPFILE echo -e "\033[01;34mParallel Virtual Cluster \033[01;36m(${DEBVER})\033[0m" >> $TMPFILE -echo -e "> \033[01;32m$(hostname)\033[0m - \033[1;37mPVC {% if is_coordinator %}coordinator{% else %}hypervisor{% endif %} node\033[0m" >> $TMPFILE +echo -e "> PVC \033[1;36m{% if is_coordinator %}coordinator{% else %}hypervisor{% endif %}\033[0m node \033[01;36m$(hostname)\033[0m" >> $TMPFILE # Get machine information HARDWARE_DETAIL="$( /usr/sbin/dmidecode | grep -A7 'System Information' )" HARDWARE_VENDOR="$( grep 'Manufacturer:' <<<"${HARDWARE_DETAIL}" | sed 's/Manufacturer: //; s/\s*$//g; s/^\s*//g' )" @@ -26,7 +26,7 @@ HARDWARE_SERIAL="$( grep 'Serial Number:' <<<"${HARDWARE_DETAIL}" | sed 's/Seria if [[ -z ${HARDWARE_SERIAL} ]]; then HARDWARE_SERIAL="Unknown" fi -echo -e "> Hardware Vendor: \033[1;31m${HARDWARE_VENDOR}\033[0m Model: \033[1;31m${HARDWARE_MODEL}\033[0m Serial: \033[1;31m${HARDWARE_SERIAL}\033[0m" >> $TMPFILE +echo -e "> Hardware Vendor: \033[1;36m${HARDWARE_VENDOR}\033[0m Model: \033[1;36m${HARDWARE_MODEL}\033[0m Serial: \033[1;36m${HARDWARE_SERIAL}\033[0m" >> $TMPFILE echo -e "> $(/bin/uname -srvmo)" >> $TMPFILE mv $TMPFILE $TGTFILE || rm $TMPFILE