def post_install(self): """ Perform post-installation tasks. """ progressQ.send_message(_("Performing post-installation setup tasks")) payload_utils.unmount(INSTALL_TREE, raise_exc=True) super().post_install() # Not using BLS configuration, skip it if os.path.exists(conf.target.system_root + "/usr/sbin/new-kernel-pkg"): return # Remove any existing BLS entries, they will not match the new system's # machine-id or /boot mountpoint. for file in glob.glob(conf.target.system_root + "/boot/loader/entries/*.conf"): log.info("Removing old BLS entry: %s", file) os.unlink(file) # Create new BLS entries for this system for kernel in self.kernel_version_list: log.info("Regenerating BLS info for %s", kernel) util.execInSysroot( "kernel-install", ["add", kernel, "/lib/modules/{0}/vmlinuz".format(kernel)])
def post_install(self): """ Unmount and remove image If file:// was used, just unmount it. """ super().post_install() if os.path.exists(IMAGE_DIR + "/LiveOS"): payload_utils.unmount(IMAGE_DIR, raise_exc=True) if os.path.exists(self.image_path) and not self.data.method.url.startswith("file://"): os.unlink(self.image_path)
def post_install(self): """ Perform post-installation tasks. """ progressQ.send_message(_("Performing post-installation setup tasks")) payload_utils.unmount(INSTALL_TREE, raise_exc=True) super().post_install() # Make sure the new system has a machine-id, it won't boot without it # (and nor will some of the subsequent commands) if not os.path.exists(util.getSysroot() + "/etc/machine-id"): log.info("Generating machine ID") util.execInSysroot("systemd-machine-id-setup", []) for kernel in self.kernel_version_list: if not os.path.exists(util.getSysroot() + "/usr/sbin/new-kernel-pkg"): log.info("Regenerating BLS info for %s", kernel) util.execInSysroot("kernel-install", ["add", kernel, "/lib/modules/{0}/vmlinuz".format(kernel)])
def unsetup(self): super().unsetup() # Unmount a previously mounted live tree payload_utils.unmount(INSTALL_TREE)