[__hostname] Use FQDN as hostname on RedHat derivatives and BSDs
This commit is contained in:
parent
7bf203509b
commit
74568e8a0a
1 changed files with 4 additions and 1 deletions
|
@ -25,10 +25,13 @@ if [ -f "$__object/parameter/name" ]; then
|
||||||
name_should="$(cat "$__object/parameter/name")"
|
name_should="$(cat "$__object/parameter/name")"
|
||||||
else
|
else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
openbsd)
|
# RedHat-derivatives and BSDs
|
||||||
|
centos|fedora|redhat|scientific|freebsd|netbsd|openbsd)
|
||||||
|
# Hostname is FQDN
|
||||||
name_should="${__target_host}"
|
name_should="${__target_host}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
# Hostname is only first component of FQDN
|
||||||
name_should="${__target_host%%.*}"
|
name_should="${__target_host%%.*}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue