From 615c25dcab8e1af4525fe5bf4d10f0ad761741c4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Apr 2010 16:16:27 -0400 Subject: Avoid using hostname -f, since on Solaris that sets the hostname to -f. Yay, Unix portability! (Instead, use dnsdomainname if available, and otherwise, fall back to the unqualified hostname.) --- commit.d/50vcs-commit | 6 +++++- debian/changelog | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit index c726167..da99d14 100755 --- a/commit.d/50vcs-commit +++ b/commit.d/50vcs-commit @@ -2,7 +2,11 @@ set -e message="$1" -hostname=`hostname -f 2>/dev/null || hostname` +hostname=`hostname` +dnsdomainname=`dnsdomainname 2>/dev/null || true` +if [ -n "$dnsdomainname" ]; then + hostname="$hostname.$dnsdomainname" +fi USER= if [ -n "$SUDO_USER" ]; then diff --git a/debian/changelog b/debian/changelog index 3d1cd9b..c3987a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ etckeeper (0.44) UNRELEASED; urgency=low * Use darcs record -m to specify commit message, instead of using a logfile. * Closes: #519228 * Update depends for git-core to git transition. + * Avoid using hostname -f, since on Solaris that sets the hostname to -f. + Yay, Unix portability! (Instead, use dnsdomainname if available, and + otherwise, fall back to the unqualified hostname.) -- Joey Hess Sun, 21 Feb 2010 13:30:33 -0500 -- cgit v1.2.3