diff --git a/src/pylorax/creator.py b/src/pylorax/creator.py index 7075d325..ae18cb2a 100644 --- a/src/pylorax/creator.py +++ b/src/pylorax/creator.py @@ -255,9 +255,6 @@ def rebuild_initrds_for_live(opts, sys_root_dir, results_dir): if not kernels: raise Exception("No initrds found, cannot rebuild_initrds") - # Hush some dracut warnings. TODO: bind-mount proc in place? - open(joinpaths(sys_root_dir,"/proc/modules"),"w") - if opts.ostree: # Dracut assumes to have some dirs in disk image # /var/tmp for temp files @@ -294,7 +291,6 @@ def rebuild_initrds_for_live(opts, sys_root_dir, results_dir): shutil.copy2(joinpaths(sys_root_dir, kernel.path), results_dir) umount(joinpaths(sys_root_dir, "var/tmp"), delete=False) umount(joinpaths(sys_root_dir, "results"), delete=False) - os.unlink(joinpaths(sys_root_dir,"/proc/modules")) def create_pxe_config(template, images_dir, live_image_name, add_args = None): """ diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py index cbb8872f..2e88a3f5 100644 --- a/src/pylorax/treebuilder.py +++ b/src/pylorax/treebuilder.py @@ -308,8 +308,6 @@ class TreeBuilder(object): if not self.kernels: raise Exception("No kernels found, cannot rebuild_initrds") - # Hush some dracut warnings. TODO: bind-mount proc in place? - open(joinpaths(self.vars.inroot,"/proc/modules"),"w") for kernel in self.kernels: if prefix: idir = os.path.dirname(kernel.path) @@ -328,8 +326,6 @@ class TreeBuilder(object): cmd = dracut + [outfile, kernel.version] runcmd(cmd, root=self.vars.inroot) - os.unlink(joinpaths(self.vars.inroot,"/proc/modules")) - def build(self): templatefile = templatemap[self.vars.arch.basearch] for tmpl in self.add_templates: