From a7fea4cfce73c8d1d271d8d0bfcf7b0b0802ad47 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 23 Feb 2019 17:17:35 +0100 Subject: Using hostname fallback if FQDN is not set. Signed-off-by: Daniel Baumann --- share/bash-completion/container | 2 +- share/scripts/debconf.d/0003-debconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/bash-completion/container b/share/bash-completion/container index b7a73ae..150ff71 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -123,7 +123,7 @@ _container() list|ls) case "${prev}" in -h|--host) - opts="true false $(hostname -f)" + opts="true false $(hostname -f 2> /dev/null || hostname)" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index 9183538..843d0b4 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -1092,7 +1092,7 @@ Internal_options () case "${CNT_CONTAINER_SERVER}" in FQDN) - CNT_CONTAINER_SERVER="$(hostname -f)" + CNT_CONTAINER_SERVER="$(hostname -f 2> /dev/null || hostname)" ;; esac -- cgit v1.2.3