allow hostname -f to fail and return empty output

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-01-20 13:52:49 +01:00
parent 9123940255
commit cd6abf379a
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
# 2010-2014 Nico Schottelius (nico-cdist at schottelius.org)
# 2012 Steven Armstrong (steven-cdist at armstrong.cc)
#
# This file is part of cdist.
@ -21,5 +21,5 @@
#
if command -v hostname >/dev/null; then
hostname -f
hostname -f 2>/dev/null || true
fi