ppc.tmpl: work around yaboot's crippling fear of backslashes

If yaboot so much as catches a whiff of a backslash in yaboot.conf, it
will reject the entire file. No bootloader config means no booting.

So as long as we're still using yaboot on PPC, we need to use ISO volume
labels it can handle. So: filter the isolabel, replacing any non-ASCII
characters with underscores.
This commit is contained in:
Will Woods 2011-11-16 15:02:43 -05:00
parent 86937d2c0a
commit 27dda6eae6

View File

@ -11,7 +11,14 @@ WRAPPER_DATA="usr/"+libdir+"/kernel-wrapper"
bitsizes = set()
prepboot = ""
rootarg = "root=live:CDLABEL=%s" % udev(isolabel)
## 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)
rootarg = "root=live:CDLABEL=%s" % isolabel
%>
mkdir ${LIVEDIR}