Adjust colour scheme of MOTD

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:29 -04:00
parent 8e1d005d43
commit 86026de8ef
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ DEBVER="$( grep 'PRETTY_NAME=' /etc/os-release | awk -F'"' '{ print $2 }' )"
echo >> $TMPFILE echo >> $TMPFILE
echo -e "\033[01;34mParallel Virtual Cluster \033[01;36m(${DEBVER})\033[0m" >> $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 # Get machine information
HARDWARE_DETAIL="$( /usr/sbin/dmidecode | grep -A7 'System 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' )" 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 if [[ -z ${HARDWARE_SERIAL} ]]; then
HARDWARE_SERIAL="Unknown" HARDWARE_SERIAL="Unknown"
fi 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 echo -e "> $(/bin/uname -srvmo)" >> $TMPFILE
mv $TMPFILE $TGTFILE || rm $TMPFILE mv $TMPFILE $TGTFILE || rm $TMPFILE