summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Kovac <multicast@users.noreply.github.com>2023-10-08 19:16:38 +0200
committerMatej Kovac <multicast@users.noreply.github.com>2023-10-08 19:16:38 +0200
commit96fa1ffcb7000db71c83b7ae74fd83a0025bd4c4 (patch)
treead48bb64aa61d6206f006b40bbc6abd7dcccef95
parente0e6dd8542796900f872c009bcd79556f5532da8 (diff)
downloadvmdb2-96fa1ffcb7000db71c83b7ae74fd83a0025bd4c4.tar.gz
stop using host reslov configuration
-rw-r--r--vmdb/plugins/unpack_rootfs_plugin.py10
1 files changed, 0 insertions, 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])