Merge pull request #318 from marineam/gce

vm_image_util: use only ttyS0 for the console on GCE instances
This commit is contained in:
Michael Marineau 2014-08-24 16:55:58 -07:00
commit d97f6e7332

View File

@ -152,6 +152,7 @@ IMG_iso_CONF_FORMAT=iso
IMG_gce_DISK_LAYOUT=vm
IMG_gce_CONF_FORMAT=gce
IMG_gce_OEM_PACKAGE=oem-gce
IMG_gce_FS_HOOK=gce
## rackspace
IMG_rackspace_BOOT_KERNEL=0
@ -342,6 +343,13 @@ _run_onmetal_fs_hook() {
-e "s/^TOTALTIMEOUT [0-9]*/TOTALTIMEOUT ${totaltimeout}/g"
}
_run_gce_fs_hook() {
# HACKITY HACK until OEMs can customize bootloader configs
local arg='console=ttyS0,115200n8'
sudo sed -i "${VM_TMP_ROOT}/boot/efi/syslinux/boot_kernel.cfg" \
-e 's/console=[^ ]*//g' -e "s/\\(append.*$\\)/\\1 ${arg}/"
}
# Write the vm disk image to the target directory in the proper format
write_vm_disk() {
if [[ $(_get_vm_opt PARTITIONED_IMG) -eq 1 ]]; then