summaryrefslogtreecommitdiff
path: root/commit.d
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-06-28 16:29:32 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-06-28 16:29:32 -0400
commit51a2682158fe2ae7ca7283d2bf2addeedfd82460 (patch)
tree3c3e5141f955048ed05fff03b33943c9e708a0b6 /commit.d
parent9029b9779edb845f577e09f40484221ebc6809de (diff)
Use hostname if hostname -f fails. Closes: #533295
Diffstat (limited to 'commit.d')
-rwxr-xr-xcommit.d/50vcs-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit
index 1f4ab03..687a2ed 100755
--- a/commit.d/50vcs-commit
+++ b/commit.d/50vcs-commit
@@ -2,7 +2,7 @@
set -e
message="$1"
-hostname=`hostname -f`
+hostname=`hostname -f 2>/dev/null || hostname`
if [ "$VCS" = git ] && [ -d .git ]; then
if [ -n "$SUDO_USER" ]; then