|
3 | 3 | #
|
4 | 4 | # Create minimal Oracle Linux images
|
5 | 5 | #
|
6 |
| -# Copyright (c) 2019, 2024 Oracle and/or its affiliates. |
| 6 | +# Copyright (c) 2019, 2025 Oracle and/or its affiliates. |
7 | 7 | # Licensed under the Universal Permissive License v 1.0 as shown at
|
8 | 8 | # https://oss.oracle.com/licenses/upl.
|
9 | 9 | #
|
@@ -189,8 +189,11 @@ load_env() {
|
189 | 189 |
|
190 | 190 | [[ "${SERIAL_CONSOLE,,}" =~ ^((yes)|(no))$ ]] || common::error "SERIAL_CONSOLE must be yes or no"
|
191 | 191 | readonly SERIAL_CONSOLE
|
| 192 | + [[ "${SERIAL_CONSOLE_RUNTIME,,}" =~ ^((yes)|(no))$ ]] || common::error "SERIAL_CONSOLE_RUNTIME must be yes or no" |
| 193 | + readonly SERIAL_CONSOLE_RUNTIME |
192 | 194 |
|
193 |
| - [[ "${BOOT_MODE,,}" =~ ^((bios)|(uefi))$ ]] || common::error "BOOT_MODE must be bios or uefi" |
| 195 | + |
| 196 | + [[ "${BOOT_MODE,,}" =~ ^((bios)|(uefi)|(hybrid))$ ]] || common::error "BOOT_MODE must be bios, uefi or hybrid" |
194 | 197 | readonly BOOT_MODE
|
195 | 198 |
|
196 | 199 | if [[ -z ${OS_VARIANT} ]]; then
|
@@ -263,7 +266,7 @@ stage_files() {
|
263 | 266 | [[ -r "${env_file}" ]] && cat "${env_file}" >> "${GLOBAL_ENV_FILE}"
|
264 | 267 | done
|
265 | 268 |
|
266 |
| - # Main provisionning script |
| 269 | + # Main provisioning script |
267 | 270 | cp "${BIN_DIR}/provision.sh" "${provision_path}/"
|
268 | 271 | cp "${BIN_DIR}/provision-common.sh" "${provision_path}/"
|
269 | 272 |
|
@@ -317,6 +320,8 @@ stage_kickstart() {
|
317 | 320 |
|
318 | 321 | cp "${DISTR_DIR}/${DISTR}/"*-ks.cfg "${ks_path}"
|
319 | 322 |
|
| 323 | + # This shouldn't be necessary with the current partitioning method, but we |
| 324 | + # leave it for backward compatibility (OL7) |
320 | 325 | if [[ "${SETUP_SWAP,,}" = "no" ]]; then
|
321 | 326 | sed -i -e '/^part swap /d' "${ks_path}"
|
322 | 327 | fi
|
@@ -368,14 +373,14 @@ image_create() {
|
368 | 373 | ISO_LABEL=$(file "${ISO_PATH}" | sed -e "s/.* '\(.*\)' .*/\1/" -e 's/ /\\x20/g')
|
369 | 374 |
|
370 | 375 | declare -ga virt_install_args
|
371 |
| - # Set Serial conole |
| 376 | + # Set Serial console |
372 | 377 | if [[ "${SERIAL_CONSOLE,,}" = "yes" ]]; then
|
373 | 378 | BOOT_COMMAND+=( "${BOOT_COMMAND_SERIAL_CONSOLE[@]}" )
|
374 | 379 | else
|
375 | 380 | virt_install_args+=(--wait "${INSTALL_WAIT_TIME}" --noautoconsole)
|
376 | 381 | fi
|
377 | 382 |
|
378 |
| - if [[ ${BOOT_MODE,,} == uefi ]]; then |
| 383 | + if [[ ${BOOT_MODE,,} != bios ]]; then |
379 | 384 | virt_install_args+=(--boot uefi)
|
380 | 385 | fi
|
381 | 386 |
|
@@ -403,7 +408,7 @@ image_create() {
|
403 | 408 | }
|
404 | 409 |
|
405 | 410 | #######################################
|
406 |
| -# Customize Oracle Linux: run provisionning scripts |
| 411 | +# Customize Oracle Linux: run provisioning scripts |
407 | 412 | # Uses libguestfs to update the ${WORKSPACE}/${VM_NAME}/${VM_NAME}.qcow2
|
408 | 413 | # Globals:
|
409 | 414 | # BUILD_INFO, MEM_SIZE, PROVISION_DIR, PROVISION_SCRIPT, SELINUX, VM_NAME, WORKSPACE
|
|
0 commit comments