summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlib/container/auto2
-rwxr-xr-xlib/container/create2
-rwxr-xr-xlib/container/list2
-rwxr-xr-xlib/container/top2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/container/auto b/lib/container/auto
index d6a76b7..83c9a57 100755
--- a/lib/container/auto
+++ b/lib/container/auto
@@ -85,7 +85,7 @@ then
Usage
fi
-HOST="$(hostname -f)"
+HOST="$(hostname -f 2> /dev/null || hostname)"
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
diff --git a/lib/container/create b/lib/container/create
index 469ba4d..43cad9b 100755
--- a/lib/container/create
+++ b/lib/container/create
@@ -178,7 +178,7 @@ EOF
;;
esac
-CNT_CONTAINER_SERVER="${CNT_CONTAINER_SERVER:-$(hostname -f)}"
+CNT_CONTAINER_SERVER="${CNT_CONTAINER_SERVER:-$(hostname -f 2> /dev/null || hostname)}"
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
diff --git a/lib/container/list b/lib/container/list
index 57d0d2d..62f6a5b 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -115,7 +115,7 @@ Parameters "${@}"
LIST="${LIST:-started stopped}"
FORMAT="${FORMAT:-cli}"
-HOST="${HOST:-$(hostname -f)}"
+HOST="${HOST:-$(hostname -f 2> /dev/null || hostname)}"
CSV_SEPARATOR="${CSV_SEPARATOR:-,}"
diff --git a/lib/container/top b/lib/container/top
index 7e757c8..4978568 100755
--- a/lib/container/top
+++ b/lib/container/top
@@ -68,7 +68,7 @@ Usage ()
Parameters "${@}"
DELAY="${DELAY:-1}"
-HOST="$(hostname -f)"
+HOST="$(hostname -f 2> /dev/null || hostname)"
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"