From b00d7efb8f00d0298da08180e429001b5c421cf9 Mon Sep 17 00:00:00 2001 From: Ivan Mikushin Date: Tue, 25 Aug 2015 17:01:13 +0500 Subject: [PATCH] choose appropriate console for install type tty0 or ttyS0 (cherry picked from commit c62ca5f) --- scripts/installer/lay-down-os | 43 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) 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}<