Skip to content

Commit 4c2a3a9

Browse files
authored
Merge pull request #197 from retekdk/issue-196
Fix ISO_LABEL handling and symlink resolution in ISO detection
2 parents de7d51a + 6145d0c commit 4c2a3a9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

oracle-linux-image-tools/bin/build-image.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,9 @@ stage_kickstart() {
367367
image_create() {
368368
common::echo_header "Install Oracle Linux"
369369

370-
# retrieve disk label -- alternatively: isoinfo -d -i
371-
local ISO_LABEL
372-
# shellcheck disable=SC2034,SC2153
373-
ISO_LABEL=$(file "${ISO_PATH}" | sed -e "s/.* '\(.*\)' .*/\1/" -e 's/ /\\x20/g')
370+
# retrieve disk label
371+
# shellcheck disable=SC2034
372+
ISO_LABEL="${ISO_LABEL:-$(file -L "${ISO_PATH}" | sed -e "s/.* '\(.*\)' .*/\1/" -e 's/ /\\x20/g')}"
374373

375374
declare -ga virt_install_args
376375
# Set Serial console

0 commit comments

Comments
 (0)