Deal with missing 'hostname' utility

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-10-21 17:41:01 -07:00
parent 6835caf484
commit 41880276a9

View File

@ -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