From 569dfb3b782eca77cef9cf619d543e2522a8e12f Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Mon, 19 Dec 2011 17:56:55 +0100 Subject: [PATCH] Add support for new kernel/initrd filenames --- grml2usb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/grml2usb b/grml2usb index ea6ae82..70fbfe1 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): -- 2.1.4