1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 17:25:23 +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 unset MAILCHECK
# Configure a set of useful variables # 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) FQDN=$(hostname)
else else
FQDN=$(hostname -f) FQDN=$(hostname -f)