+ logging.info("Copying files. This might take a while....")
+
+ squashfs = search_file(grml_flavour + '.squashfs', iso_mount)
+ if squashfs is None:
+ logging.critical("Fatal: squashfs file not found")
+ else:
+ squashfs_target = target + '/live/'
+ execute(mkdir, squashfs_target)
+ # use install(1) for now to make sure we can write the files afterwards as normal user as well
+ logging.debug("cp %s %s" % (squashfs, target + '/live/' + grml_flavour + '.squashfs'))
+ proc = subprocess.Popen(["install", "--mode=664", squashfs, squashfs_target + grml_flavour + ".squashfs"])
+ proc.wait()
+
+ filesystem_module = search_file('filesystem.module', iso_mount)
+ if filesystem_module is None:
+ logging.critical("Fatal: filesystem.module not found")
+ else:
+ logging.debug("cp %s %s" % (filesystem_module, squashfs_target + grml_flavour + '.module'))
+ proc = subprocess.Popen(["install", "--mode=664", filesystem_module, squashfs_target + grml_flavour + '.module'])
+ proc.wait()
+
+ release_target = target + '/boot/release/' + grml_flavour
+ execute(mkdir, release_target)
+
+ kernel = search_file('linux26', iso_mount)
+ if kernel is None:
+ logging.critical("Fatal kernel not found")
+ else:
+ logging.debug("cp %s %s" % (kernel, release_target + '/linux26'))
+ proc = subprocess.Popen(["install", "--mode=664", kernel, release_target + '/linux26'])
+ proc.wait()
+
+ initrd = search_file('initrd.gz', iso_mount)
+ if initrd is None:
+ logging.critical("Fatal: initrd not found")
+ else:
+ logging.debug("cp %s %s" % (initrd, release_target + '/initrd.gz'))
+ proc = subprocess.Popen(["install", "--mode=664", initrd, release_target + '/initrd.gz'])
+ proc.wait()