1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 09:15:24 +02:00

[bash] environment variables, prevent one potential dns request

This commit is contained in:
Hyacinthe Cartiaux 2017-03-15 21:28:14 +01:00
parent b05de08cb2
commit 43cd180f6f

View file

@ -33,7 +33,9 @@ export LANG LANGUAGE LC_CTYPE LC_ALL
unset MAILCHECK
# Configure a set of useful variables
if [[ "$(echo "$UNAME" | grep -c -i -e '^.*bsd$')" == "1" ]] ; then
if [[ -e /proc/sys/kernel/hostname ]] ; then
FQDN=$(cat /proc/sys/kernel/hostname)
elif [[ "$(echo "$UNAME" | grep -c -i -e '^.*bsd$')" == "1" ]] ; then
FQDN=$(hostname)
else
FQDN=$(hostname -f)