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