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 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'commit.d/50vcs-commit') 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 -- cgit v1.2.3