From 9e8e7a745fca7a9a327a9bb66eda815fed390092 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 22 May 2024 15:23:11 -0700 Subject: [PATCH] aarch64: Replace spaces and escape characters in isolabel with '-' Resolves: RHEL-22656 --- 80-rhel/aarch64.tmpl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/80-rhel/aarch64.tmpl b/80-rhel/aarch64.tmpl index 0b6ee50..14099d6 100644 --- a/80-rhel/aarch64.tmpl +++ b/80-rhel/aarch64.tmpl @@ -6,6 +6,12 @@ KERNELDIR=PXEBOOTDIR STAGE2IMG="images/install.img" LORAXDIR="usr/share/lorax/" +## Don't allow spaces or escape characters in the iso label +def valid_label(ch): + return ch.isalnum() or ch == '_' + +isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel) + import os from os.path import basename from pylorax.sysutils import joinpaths