From 74568e8a0aa0f1e8222aff49c9b00f667694b0c3 Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Sun, 6 Oct 2019 18:02:24 +0200 Subject: [PATCH] [__hostname] Use FQDN as hostname on RedHat derivatives and BSDs --- cdist/conf/type/__hostname/manifest | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cdist/conf/type/__hostname/manifest b/cdist/conf/type/__hostname/manifest index f1c17653..5d9eeeeb 100755 --- a/cdist/conf/type/__hostname/manifest +++ b/cdist/conf/type/__hostname/manifest @@ -25,10 +25,13 @@ if [ -f "$__object/parameter/name" ]; then name_should="$(cat "$__object/parameter/name")" else case "$os" in - openbsd) + # RedHat-derivatives and BSDs + centos|fedora|redhat|scientific|freebsd|netbsd|openbsd) + # Hostname is FQDN name_should="${__target_host}" ;; *) + # Hostname is only first component of FQDN name_should="${__target_host%%.*}" ;; esac