diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2019-02-23 16:17:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2019-02-23 16:27:56 +0000 |
commit | a7fea4cfce73c8d1d271d8d0bfcf7b0b0802ad47 (patch) | |
tree | 18aacb25efcf8376f31f97d34cf664b21ec83c3b /bin | |
parent | Harmonizing debconf values for container debconf create script. (diff) | |
download | compute-tools-a7fea4cfce73c8d1d271d8d0bfcf7b0b0802ad47.tar.xz compute-tools-a7fea4cfce73c8d1d271d8d0bfcf7b0b0802ad47.zip |
Using hostname fallback if FQDN is not set.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/container | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/container b/bin/container index 5df0fff..ac8feff 100755 --- a/bin/container +++ b/bin/container @@ -67,7 +67,7 @@ do create|remove|rm|restart|start|stop) USER="${SUDO_USER:-${USER}}" DATE="$(date +%Y-%m-%d\ %H:%M:%S)" - HOST="$(hostname -f)" + HOST="$(hostname -f 2> /dev/null || hostname)" # logfile echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${PROJECT}/${PROGRAM}.log" |