mirror of https://github.com/containers/podman.git
Determine if resolv.conf points to systemd-resolved
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
This commit is contained in:
parent
37658c0976
commit
6a1233597a
|
@ -1383,6 +1383,11 @@ func (c *Container) generateResolvConf() (string, error) {
|
||||||
return "", err
|
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)
|
contents, err := ioutil.ReadFile(resolvPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.Wrapf(err, "unable to read %s", resolvPath)
|
return "", errors.Wrapf(err, "unable to read %s", resolvPath)
|
||||||
|
|
Loading…
Reference in New Issue