From 7e2e404fb0dbd6ddff89fc23389216b3efc585b5 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 24 Mar 2014 14:32:22 +0100 Subject: [PATCH] don't use HOSTNAME that is already set --- scripts/create-vm.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/create-vm.sh b/scripts/create-vm.sh index 5bf5cfa..c8c26c7 100755 --- a/scripts/create-vm.sh +++ b/scripts/create-vm.sh @@ -38,13 +38,14 @@ function usage () { exit 1 } +# using HOSTNAME won't work as this is already set in environment while getopts "cf:i:m:n:h" flag; do case $flag in c) CONFIRM=true ;; f) DISTRO=$OPTARG ;; i) IMAGE=$OPTARG ;; m) MEMORY=$OPTARG ;; - n) HOSTNAME=$OPTARG ;; + n) VM_HOSTNAME=$OPTARG ;; ?|h) usage "" ;; esac done @@ -60,8 +61,8 @@ container="$1" ; shift # comopute all vars from args [ -z "$DISTRO" ] && DISTRO="$DEFAULT_DISTRO" -[ -z "$HOSTNAME" ] && HOSTNAME="$container" -fqdn=$HOSTNAME.$DOMAIN +[ -z "$VM_HOSTNAME" ] && VM_HOSTNAME="$container" +fqdn=$VM_HOSTNAME.$DOMAIN # prepare initvm command initvm="$BUILD/lbuild-initvm.sh" -- 2.43.0