diff --git a/80-rhel/s390.tmpl b/80-rhel/s390.tmpl index 89d55f3..a2e9dd4 100644 --- a/80-rhel/s390.tmpl +++ b/80-rhel/s390.tmpl @@ -1,4 +1,4 @@ -<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot"/> +<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, product, isolabel"/> <% configdir="tmp/config_files/s390" BOOTDIR="images" @@ -9,6 +9,12 @@ MKS390IMAGE="/usr/bin/mk-s390image" # The assumption seems to be that there is only one s390 kernel, ever kernel = kernels[0] +## 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