From 97123b194bf4caa0b8911af44fcf34e34b217ab6 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 8 Nov 2019 09:59:36 -0800 Subject: [PATCH] Update ppc64le isolabel to match x86_64 logic It was substituting _ which didn't match what pungi uses for creating the DVD. Make things consistent and use - as the replacement character. (cherry picked from commit 372bef945f2addbf66c35bce8439f3508ee2ab8a) Resolves: rhbz#1757338 --- 80-rhel/ppc64le.tmpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/80-rhel/ppc64le.tmpl b/80-rhel/ppc64le.tmpl index aeff30e..0c2c0d1 100644 --- a/80-rhel/ppc64le.tmpl +++ b/80-rhel/ppc64le.tmpl @@ -6,11 +6,11 @@ GRUBDIR="boot/grub" STAGE2IMG="images/install.img" LORAXDIR="usr/share/lorax/" -## NOTE: yaboot freaks out and stops parsing its config if it sees a '\', -## so we can't use the udev escape sequences in the root arg. -## Instead we'll just replace any non-ASCII characters in the isolabel -## with '_', which means we won't need any udev escapes. -isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel) +## 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) from os.path import basename %>