From 13f2d095995368d2a5c56c5aa629a30763345e4c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 13 May 2013 16:24:36 +0000 Subject: [PATCH] deployment.sh: export $TARGET_HOSTNAME as $HOSTNAME iff available The $HOSTNAME contains the dhcp client name during deployment otherwise :( From: Michael Prokop --- deployment.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deployment.sh b/deployment.sh index d0d16a5..f31b71d 100755 --- a/deployment.sh +++ b/deployment.sh @@ -296,6 +296,13 @@ 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 @@ -933,7 +940,6 @@ fi grml-chroot $TARGET /etc/init.d/hostname.sh # make sure installations of packages works, will be overriden later again -[ -n "$HOSTNAME" ] || HOSTNAME="kantan" cat > $TARGET/etc/hosts << EOF 127.0.0.1 localhost 127.0.0.1 $HOSTNAME