Fallback hostname to localhost.
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 28 Oct 2014 15:08:07 +0000 (16:08 +0100)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 28 Oct 2014 15:08:07 +0000 (16:08 +0100)
debian/config

index bd7a5fc..eb026c6 100644 (file)
@@ -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"