diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-14 03:45:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 03:45:20 -0400 |
commit | b7936b552f33435aff7495531447ce032adc79e2 (patch) | |
tree | 67e6b9a995c6e2451e8e8e270ccaaae846712797 /libpod | |
parent | 3f5f99b8839c391f3bc2450ac0c5ddc6960c88b9 (diff) | |
parent | 6a1233597aeb39139f5d9daef19e5e7f672b71ec (diff) | |
download | podman-b7936b552f33435aff7495531447ce032adc79e2.tar.gz podman-b7936b552f33435aff7495531447ce032adc79e2.tar.bz2 podman-b7936b552f33435aff7495531447ce032adc79e2.zip |
Merge pull request #7616 from EduardoVega/5845-support-for-systemd-resolved
Determine if resolv.conf points to systemd-resolved
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal_linux.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 86a28c176..3bdf28e8c 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1383,6 +1383,11 @@ func (c *Container) generateResolvConf() (string, error) { return "", err } + // Determine if symlink points to any of the systemd-resolved files + if strings.HasPrefix(resolvPath, "/run/systemd/resolve/") { + resolvPath = "/run/systemd/resolve/resolv.conf" + } + contents, err := ioutil.ReadFile(resolvPath) if err != nil { return "", errors.Wrapf(err, "unable to read %s", resolvPath) |