From 96fa1ffcb7000db71c83b7ae74fd83a0025bd4c4 Mon Sep 17 00:00:00 2001 From: Matej Kovac Date: Sun, 8 Oct 2023 19:16:38 +0200 Subject: stop using host reslov configuration --- vmdb/plugins/unpack_rootfs_plugin.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vmdb/plugins/unpack_rootfs_plugin.py b/vmdb/plugins/unpack_rootfs_plugin.py index fb0945a..dc67c01 100644 --- a/vmdb/plugins/unpack_rootfs_plugin.py +++ b/vmdb/plugins/unpack_rootfs_plugin.py @@ -41,14 +41,4 @@ class UnpackCacheStepRunner(vmdb.StepRunnerInterface): raise Exception("--rootfs-tarball MUST be set") if os.path.exists(tar_path): vmdb.runcmd(["tar", "-C", rootdir, "-xf", tar_path, "--numeric-owner"]) - self.copy_resolv_conf(rootdir) state.rootfs_unpacked = True - - def copy_resolv_conf(self, rootdir): - # handle the case where /etc/resolv.conf is a symlink on the target - # (which is the case for many modern Linuxes) by copying the host file - # to the target of the symlink in the chroot - filename = os.path.realpath(os.path.join(rootdir, "etc", "resolv.conf")) - target_dir = os.path.dirname(filename) - os.makedirs(target_dir, exist_ok=True) - vmdb.runcmd(["cp", "/etc/resolv.conf", filename]) -- cgit v1.2.1