From 41880276a90081c84fcff4c880440b0d2cc40d4f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 21 Oct 2015 17:41:01 -0700 Subject: [PATCH] Deal with missing 'hostname' utility Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 5588b419b..9a26f8c7c 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -3633,7 +3633,13 @@ get_config() { VERBOSITY=2 fi - g_hostname=$(hostname 2> /dev/null) + if qt mywhich hostname; then + g_hostname=$(hostname 2> /dev/null) + elif qt mywhich uname; then + g_hostname=$(uname -n 2> /dev/null) + else + g_hostname=localhost + fi if [ -n "$IPSET" ]; then case "$IPSET" in