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
# 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"