aarch64: Replace spaces and escape characters in isolabel with '-'

Resolves: RHEL-22656
This commit is contained in:
Brian C. Lane 2024-05-22 15:23:11 -07:00
parent 9a2ec4fccf
commit 9e8e7a745f

View File

@ -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