From: Valentin Vidic Date: Tue, 28 Oct 2014 15:08:07 +0000 (+0100) Subject: Fallback hostname to localhost. X-Git-Tag: debian/20141028~1 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=bacula-cn.git;a=commitdiff_plain;h=e1097202f3593c98f3c9fdd3c31380b79d98bf58 Fallback hostname to localhost. --- diff --git a/debian/config b/debian/config index bd7a5fc..eb026c6 100644 --- a/debian/config +++ b/debian/config @@ -5,6 +5,10 @@ set -e # Guess default hostname HOST=$( hostname -f || true ) +if [ -z "$HOST" ]; then + HOST=localhost +fi + db_get bacula-cn/hostname || true if [ -z "$RET" ]; then db_set bacula-cn/hostname "$HOST"