fix: refs #7735 MOTD updated and fixes
This commit is contained in:
parent
eb08a7f164
commit
b6d7ca1590
|
@ -1,6 +1,3 @@
|
|||
#!/bin/sh
|
||||
uname -snrvm
|
||||
root@dhcp1:/etc/dhcp/subnets# cat /etc/update-motd.d/90-vn
|
||||
#!/bin/bash
|
||||
|
||||
LABEL="\033[0;32m"
|
||||
|
@ -25,10 +22,10 @@ case "$FQDN" in
|
|||
ENVIRONMENT="${LAB}Laboratory${RESET}"
|
||||
;;
|
||||
*.verdnatura.es)
|
||||
ENVIRONMENT="-"
|
||||
ENVIRONMENT="${UNKNOWN}Unknown${RESET}"
|
||||
;;
|
||||
*)
|
||||
ENVIRONMENT="${UNKNOWN}Unknown${RESET}"
|
||||
ENVIRONMENT="-"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -49,11 +46,11 @@ SHOW_UPGRADEABLE=0
|
|||
USER_UID=$(id -u $USER)
|
||||
USER_GROUPS=$(id -Gn $USER)
|
||||
|
||||
if [ ${USER_UID} -eq 0 ] ; then
|
||||
SHOW_UPGRADEABLE=1
|
||||
if [ ${USER_UID} -eq 0 ] ; then
|
||||
SHOW_UPGRADEABLE=1
|
||||
fi
|
||||
if [[ "${USER_GROUPS}" == *"sysadmin"* ]] ; then
|
||||
SHOW_UPGRADEABLE=1
|
||||
if [[ "${USER_GROUPS}" == *"sysadmin"* ]] ; then
|
||||
SHOW_UPGRADEABLE=1
|
||||
fi
|
||||
if [ $SHOW_UPGRADEABLE -eq 1 ] ; then
|
||||
UPGRADEABLE="$(apt list --upgradable 2>/dev/null | tail -n +2 | wc -l)"
|
||||
|
@ -77,15 +74,15 @@ GL="\e[48;5;70m"
|
|||
RS="\e[0m"
|
||||
|
||||
echo -e
|
||||
echo -e " $GL $GB $RS"
|
||||
echo -e " $GL $GB $GL $RS $GL $GB $RS" " ${FW}__ __ _ ${FG} _ _ _ ${RS}"
|
||||
echo -e " $GB $GL $RS $GL $GB $GL $RS" " ${FW}\ \ / /__ _ __ __| |${FG}| \ | | __ _| |_ _ _ _ __ __ _ ${RS}"
|
||||
echo -e " $GL $GB $RS $GB $GL $RS " " ${FW} \ \ / / _ \ '__/ _' |${FG}| \| |/ _' | __| | | | '__/ _' |${RS}"
|
||||
echo -e " $GL $GB $RS $GB $GL $RS " " ${FW} \ V / __/ | | (_| |${FG}| |\ | (_| | |_| |_| | | | (_| |${RS}"
|
||||
echo -e " " " ${FW} \_/ \___|_| \__,_|${FG}|_| \_|\__,_|\__|\__,_|_| \__,_|${RS}"
|
||||
echo -e " $GL $GB $RS $GB $GL $RS"
|
||||
echo -e " $GL $GB $GL $RS $GL $GB $RS"
|
||||
echo -e " $GB $GL $RS"
|
||||
echo -e " $GL $GB $RS"
|
||||
echo -e " $GL $GB $GL $RS $GL $GB $RS" " ${FW}__ __ _ ${FG} _ _ _ ${RS}"
|
||||
echo -e " $GB $GL $RS $GL $GB $GL $RS" " ${FW}\ \ / /__ _ __ __| |${FG}| \ | | __ _| |_ _ _ _ __ __ _ ${RS}"
|
||||
echo -e " $GL $GB $RS $GB $GL $RS " " ${FW} \ \ / / _ \ '__/ _' |${FG}| \| |/ _' | __| | | | '__/ _' |${RS}"
|
||||
echo -e " $GL $GB $RS $GB $GL $RS " " ${FW} \ V / __/ | | (_| |${FG}| |\ | (_| | |_| |_| | | | (_| |${RS}"
|
||||
echo -e " " " ${FW} \_/ \___|_| \__,_|${FG}|_| \_|\__,_|\__|\__,_|_| \__,_|${RS}"
|
||||
echo -e " $GL $GB $RS $GB $GL $RS"
|
||||
echo -e " $GL $GB $GL $RS $GL $GB $RS"
|
||||
echo -e " $GB $GL $RS"
|
||||
echo -e
|
||||
|
||||
# Information
|
||||
|
|
Loading…
Reference in New Issue