diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index ed9362a..4a9b59a 100644 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -503,13 +503,6 @@ if checkBootParam ngcphostname ; then TARGET_HOSTNAME="$(getBootParam ngcphostname)" || true fi -if [ -n "$TARGET_HOSTNAME" ] ; then - export HOSTNAME="$TARGET_HOSTNAME" -else - [ -n "$HOSTNAME" ] || HOSTNAME="nohostname" - export HOSTNAME -fi - if checkBootParam ngcpip1 ; then IP1=$(getBootParam ngcpip1) fi @@ -808,6 +801,12 @@ if [ -z "$TARGET_HOSTNAME" ] ; then fi fi +[ -z "$HOSTNAME" ] && HOSTNAME="nohostname" +if [ -n "$TARGET_HOSTNAME" ] ; then + HOSTNAME="$TARGET_HOSTNAME" +fi +export HOSTNAME + # get install device from "ip=:..." boot arg if checkBootParam ip ; then declare -A IP_ARR