mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-29 17:27:41 +00:00
Merge pull request #7616 from EduardoVega/5845-support-for-systemd-resolved
Determine if resolv.conf points to systemd-resolved
This commit is contained in:
commit
b7936b552f
1 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue