diff --git a/scripts/installer/lay-down-os b/scripts/installer/lay-down-os index 69d01495..2213380b 100755 --- a/scripts/installer/lay-down-os +++ b/scripts/installer/lay-down-os @@ -2,10 +2,11 @@ set -e -x . $(dirname $0)/version +VERSION=${VERSION:?"VERSION not set"} while getopts "i:f:c:d:t:r:o:p:" OPTION do - case $OPTION in + case ${OPTION} in i) DIST="$OPTARG" ;; f) FILES="$OPTARG" ;; c) CLOUD_CONFIG="$OPTARG" ;; @@ -20,6 +21,7 @@ done DIST=${DIST:-/dist} CLOUD_CONFIG=${CLOUD_CONFIG:-/scripts/conf/empty.yml} +CONSOLE=tty0 BASE_DIR="/mnt/new_img" # TODO: Change this to a number so that users can specify. # Will need to make it so that our builds and packer APIs remain consistent. @@ -56,7 +58,7 @@ mount_device() mount_opts=${PARTITION} fi - mount $mount_opts ${BASE_DIR} + mount ${mount_opts} ${BASE_DIR} trap "umount ${BASE_DIR}" EXIT } @@ -72,25 +74,25 @@ install_grub() { grub2_config(){ local grub_cfg=${BASE_DIR}/boot/grub/grub.cfg local append_line="${1}" -cat >$grub_cfg <${grub_cfg} <>$grub_cfg <>${grub_cfg} < $grub_file< ${grub_file}<> $grub_file<> ${grub_file}<