From 54acdd3f4b1bf7ba9728b7bd3a3904379caea95c Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 14 Jul 2014 09:52:53 -0700 Subject: [PATCH] Allow _ in isolabel (#1118955) --- 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 eb67bbf0..3d5b2c5d 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 cdd74776..02117cd0 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}