diff --git a/share/live/x86.tmpl b/share/live/x86.tmpl index 522c873b..eb67bbf0 100644 --- a/share/live/x86.tmpl +++ b/share/live/x86.tmpl @@ -6,6 +6,9 @@ PXEBOOTDIR="images/pxeboot" BOOTDIR="isolinux" KERNELDIR=PXEBOOTDIR LIVEDIR="LiveOS" + +## Don't allow spaces or escape characters in the iso label +isolabel = ''.join(ch if ch.isalnum() else '-' for ch in isolabel) %> mkdir ${LIVEDIR} diff --git a/share/x86.tmpl b/share/x86.tmpl index a139596f..cdd74776 100644 --- a/share/x86.tmpl +++ b/share/x86.tmpl @@ -6,6 +6,9 @@ PXEBOOTDIR="images/pxeboot" BOOTDIR="isolinux" KERNELDIR=PXEBOOTDIR LIVEDIR="LiveOS" + +## Don't allow spaces or escape characters in the iso label +isolabel = ''.join(ch if ch.isalnum() else '-' for ch in isolabel) %> mkdir ${LIVEDIR} diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 952f08f8..83f5286d 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -242,7 +242,7 @@ class Lorax(BaseLoraxClass): # NOTE: if you change isolabel, you need to change pungi to match, or # the pungi images won't boot. - isolabel = volid or "{0.name} {0.version} {1.basearch}".format(self.product, + isolabel = volid or "{0.name}-{0.version}-{1.basearch}".format(self.product, self.arch) if len(isolabel) > 32: diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index 47eec2ce..e5f4f77a 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -557,7 +557,7 @@ def make_livecd(opts, mount_dir, work_dir): remove(fullpath) shutil.copytree(configdir, fullpath) - isolabel = opts.volid or "{0.name} {0.version} {1.basearch}".format(product, arch) + isolabel = opts.volid or "{0.name}-{0.version}-{1.basearch}".format(product, arch) if len(isolabel) > 32: isolabel = isolabel[:32] log.warn("Truncating isolabel to 32 chars: %s", isolabel)