X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=42426ee265fe408a91b966f02db55f1679bf526e;hp=09e9925afd52792479d926fa5468dde1f5e7695c;hb=f956c82e76971d2706f783b2e7907a14fb0e4196;hpb=c6af951293eab71d873ab7251eb77547b72ec437 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