]> granicus.if.org Git - pdns/commitdiff
make dist_recursor happy on a system without git and a resolvable hostname
authorKees Monshouwer <mind04@monshouwer.org>
Fri, 10 May 2013 18:42:48 +0000 (20:42 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 10 May 2013 18:42:48 +0000 (20:42 +0200)
pdns/dist-recursor

index 8222263bdeec8a2ad3682afdb543ae28f2f06978..403aea601f8871e8a37228411b0a95757f013e3b 100755 (executable)
@@ -10,13 +10,13 @@ DIST_HOST=""
 ## End patch area.
 
 if [ -z "$VERSION" ]; then
-  VERSION=$(git describe --always --dirty=+ 2>/dev/null)
+  VERSION=$(git describe --always --dirty=+ 2>/dev/null || true)
   if [ -z "$VERSION" ]; then
     VERSION="UNKNOWN"
   else
     VERSION="git-"$VERSION
   fi
-  DIST_HOST="$(id -u -n)@$(hostname -f)"
+  DIST_HOST="$(id -u -n)@$(hostname -f || hostname)"
 fi
 
 INCLUDES="iputils.hh arguments.hh base64.hh zoneparser-tng.hh \