X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=18463a47fe7555e8174e85b30f2390c6fb768eb2;hp=ea6ae820a452e48f65334087b861574ceb5b7768;hb=6817350f1070c71101b784500a4642e71bc3adbe;hpb=bd89fc4660e6e0ea6a298dfc894572dd35ee5181 diff --git a/grml2usb b/grml2usb index ea6ae82..18463a4 100755 --- a/grml2usb +++ b/grml2usb @@ -952,19 +952,19 @@ def copy_system_files(grml_flavour, iso_mount, target): if os.path.isdir(iso_mount + '/boot/release'): prefix = release_path + '/' - kernel = search_file(prefix + 'linux26', iso_mount) + kernel = search_file(prefix + 'vmlinuz', iso_mount) + initrd = search_file(prefix + 'initrd.img', iso_mount) if kernel is None: - logging.critical("Fatal kernel not found") - raise CriticalException("error locating kernel file") - else: - exec_rsync(kernel, release_target + '/linux26') + # compat for releases < 2011.12 + kernel = search_file(prefix + 'linux26', iso_mount) + initrd = search_file(prefix + 'initrd.gz', iso_mount) - initrd = search_file(prefix + 'initrd.gz', iso_mount) - if initrd is None: - logging.critical("Fatal: initrd not found") - raise CriticalException("error locating initrd file") - else: - exec_rsync(initrd, release_target + '/initrd.gz') + if kernel is None or initrd is None: + logging.critical("Fatal: kernel or initrd not found") + raise CriticalException("error locating kernel or initrd file") + + exec_rsync(kernel, release_target + '/') + exec_rsync(initrd, release_target + '/') def update_grml_versions(iso_mount, target): @@ -1295,7 +1295,7 @@ def modify_grub_config(filename): for regex in options.removeoption: regexe.append(re.compile(r'%s' % regex)) - option_re = re.compile(r'(.*/boot/release/.*linux26.*)') + option_re = re.compile(r'(.*/boot/release/.*(linux26|vmlinuz).*)') for line in fileinput.input(filename, inplace=1): if regexe and option_re.search(line): @@ -1443,7 +1443,7 @@ def adjust_syslinux_bootoptions(src, flavour): regexe = [] option_re = None if options.removeoption: - option_re = re.compile(r'/boot/release/.*/initrd.gz') + option_re = re.compile(r'/boot/release/.*/(initrd.gz|initrd.img)') for regex in options.removeoption: regexe.append(re.compile(r'%s' % regex)) @@ -1492,7 +1492,7 @@ def add_syslinux_entry(filename, grml_flavour): data.close() def modify_filenames(grml_flavour, target, filenames): - """Replace the standarf filenames with the new ones + """Replace the standard filenames with the new ones @grml_flavour: grml-flavour strin @target: directory where the files are located @@ -1569,7 +1569,7 @@ def handle_syslinux_config(grml_flavour, target): entry = 'include %s\n' % new_default defaults_file = '%s/defaults.cfg' % syslinux_target new_default_with_path = "%s/%s" % (syslinux_target, new_default) - new_grml_cfg = "%s/%s_grml.cfg" % ( syslinux_target, flavour_filename) + new_grml_cfg = "%s/%s_grml.cfg" % (syslinux_target, flavour_filename) if os.path.isfile(defaults_file):