add host_domain

This commit is contained in:
Gilles Mouchet 2024-07-01 15:42:04 +02:00
parent dd4f3497b8
commit 83c3c1b9b3

View File

@ -33,6 +33,7 @@ alias sudo='sudo --preserve-env=PATH env' # https://www.petefreitag.com/blog/env
if ! is_scp; then if ! is_scp; then
if [[ "$USER" == "gilles" || "$USER" == "root" ]]; then if [[ "$USER" == "gilles" || "$USER" == "root" ]]; then
host_domain=$(hostname -d)
host_fqdn=$(hostname) host_fqdn=$(hostname)
host_short=$(hostname -s) host_short=$(hostname -s)
ip=$(hostname -I) ip=$(hostname -I)
@ -40,6 +41,7 @@ if ! is_scp; then
kern=$(uname -r) kern=$(uname -r)
cat << EOF cat << EOF
--------------------------------------------------------- ---------------------------------------------------------
Host domain: $host_domain
Host name (fqdn): $host_fqdn Host name (fqdn): $host_fqdn
Host name (short): $host_short Host name (short): $host_short
Distribution: $dist Distribution: $dist