From 640af300cba4c032d55f9af7e5b2ea2fd6f0893c Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 7 Sep 2016 20:38:44 -0600 Subject: [PATCH] additional hostname checks in gravity.sh - Test if /etc/hostname exists before attempting to cat the file. - Add alternative hostname discovery via hostname command - Add an error message to stdout if unable to determine host fqdn --- gravity.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 0b1622e0..a1485acf 100755 --- a/gravity.sh +++ b/gravity.sh @@ -264,7 +264,13 @@ function gravity_unique() { function gravity_hostFormat() { # Format domain list as "192.168.x.x domain.com" echo "::: Formatting domains into a HOSTS file..." - hostname=$(