[lorax] Allow _ in isolabel (#1118955)

Brian C. Lane bcl at redhat.com
Mon Jul 14 17:08:02 UTC 2014


---
 share/live/x86.tmpl | 5 ++++-
 share/x86.tmpl      | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/share/live/x86.tmpl b/share/live/x86.tmpl
index eb67bbf..3d5b2c5 100644
--- a/share/live/x86.tmpl
+++ b/share/live/x86.tmpl
@@ -8,7 +8,10 @@ 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)
+def valid_label(ch):
+    return ch.isalnum() or ch == '_'
+
+isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
 %>
 
 mkdir ${LIVEDIR}
diff --git a/share/x86.tmpl b/share/x86.tmpl
index cdd7477..02117cd 100644
--- a/share/x86.tmpl
+++ b/share/x86.tmpl
@@ -8,7 +8,10 @@ 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)
+def valid_label(ch):
+    return ch.isalnum() or ch == '_'
+
+isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
 %>
 
 mkdir ${LIVEDIR}
-- 
1.9.3



More information about the anaconda-patches mailing list