diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index 6dcf3a1..406ef79 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -487,13 +487,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 @@ -792,6 +785,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