Permalink
Browse files

use hostname -f || hostname consistently

(cherry picked from commit e0febdd)
  • Loading branch information...
1 parent bf357ff commit 5d02d01e76845332952fe9f327a6f296fc49ce70 @fobser fobser committed with rubenk May 7, 2015
Showing with 5 additions and 5 deletions.
  1. +1 −1 build-scripts/set-version-auth
  2. +1 −1 build-scripts/set-version-recursor
  3. +1 −1 pdns/Makefile-recursor
  4. +1 −1 pdns/Makefile.am
  5. +1 −1 pdns/dist-recursor
@@ -4,7 +4,7 @@ DEB_VERSION=$2
RPM_VERSION=$3
[ -z "$VERSION" -o -z "$DEB_VERSION" -o -z "$RPM_VERSION" ] && exit 1
-DIST_HOST="$(id -u -n)@$(hostname -f)"
+DIST_HOST="$(id -u -n)@$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)"
sed -r "s/Version: (.*)/Version: $RPM_VERSION/" -i pdns.spec
sed -r "s/AC_INIT\(\[pdns\],(.*)/AC_INIT([pdns], [$VERSION])/" -i configure.ac
@@ -4,7 +4,7 @@ DEB_VERSION=$2
RPM_VERSION=$3
[ -z "$VERSION" -o -z "$DEB_VERSION" -o -z "$RPM_VERSION" ] && exit 1
-DIST_HOST="$(id -u -n)@$(hostname -f)"
+DIST_HOST="$(id -u -n)@$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)"
sed -r "s/^VERSION=(.*)/VERSION=$VERSION/" -i pdns/dist-recursor
sed -r "s/^DIST_HOST=(.*)/DIST_HOST=$DIST_HOST/" -i pdns/dist-recursor
@@ -71,7 +71,7 @@ CFLAGS += -DSYSCONFDIR='"$(SYSCONFDIR)"' -DLOCALSTATEDIR='"$(LOCALSTATEDIR)"'
# Version
build_date=$(shell LC_TIME=C date '+%Y%m%d%H%M%S')
-build_host=$(shell id -u -n)@$(shell hostname -f)
+build_host=$(shell id -u -n)@$(shell hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)
.PHONY: version_generated.h
version_generated.h:
View
@@ -370,7 +370,7 @@ bind-dnssec.schema.sqlite3.sql.h: bind-dnssec.schema.sqlite3.sql
cp $< $@
build_date=$(shell LC_TIME=C date '+%Y%m%d%H%M%S')
-build_host=$(shell id -u -n)@$(shell hostname -f)
+build_host=$(shell id -u -n)@$(shell hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)
if RELEASE_BUILD
pdns_version=$(PACKAGE_VERSION)
dist_host=$(DIST_HOST)
View
@@ -16,7 +16,7 @@ if [ -z "$VERSION" ]; then
else
VERSION="git-"$VERSION
fi
- DIST_HOST="$(id -u -n)@$(hostname -f || hostname)"
+ DIST_HOST="$(id -u -n)@$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)"
fi
INCLUDES="iputils.hh arguments.hh base64.hh zoneparser-tng.hh \

0 comments on commit 5d02d01

Please sign in to comment.