From: Ulrich Dangel Date: Wed, 11 Jan 2012 12:04:03 +0000 (+0100) Subject: Only modify live-media-path for current flavour X-Git-Tag: v0.11.5~1 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=c421fb3689da5cf30b9d2bdeb0602f178d84d2ff Only modify live-media-path for current flavour --- diff --git a/grml2usb b/grml2usb index 09e9925..42426ee 100755 --- a/grml2usb +++ b/grml2usb @@ -1127,13 +1127,15 @@ def handle_grub_config(grml_flavour, device, target): remove_regexes.append(re.compile(regex)) shortname = get_shortname(grml_flavour) - for filename in glob.glob(grub_target + shortname + '*.cfg'): + for filename in glob.glob(grub_target + '*.cfg'): for line in fileinput.input(filename, inplace=1): line = line.rstrip("\r\n") if option_re.search(line): line = bootid_re.sub('', line) - line = live_media_path_re.sub('', line) - line = line.rstrip() + r' live-media-path=/live/%s/ bootid=%s %s ' % (grml_flavour, UUID, bootopt) + if shortname in filename: + line = live_media_path_re.sub('', line) + line = line.rstrip() + ' live-media-path=/live/%s/ ' % (grml_flavour) + line = line.rstrip() + r' bootid=%s %s ' % (UUID, bootopt) for regex in remove_regexes: line = regex.sub(' ', line) print line