summaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-03-26 13:55:19 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-03-27 10:12:18 -0400
commit0cd92eae65b31cdbaa19e3cccb0e3234196a6d17 (patch)
tree97ad5dec432154ba5bc88e758d5110494d45d35f /libpod/container_internal_linux.go
parent86f03e0e526bbf39ea8a6cb18e3067a7e37bfd89 (diff)
downloadpodman-0cd92eae65b31cdbaa19e3cccb0e3234196a6d17.tar.gz
podman-0cd92eae65b31cdbaa19e3cccb0e3234196a6d17.tar.bz2
podman-0cd92eae65b31cdbaa19e3cccb0e3234196a6d17.zip
Resolve review comments
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 3bb8b23ec..02f8d6aa4 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -703,7 +703,7 @@ func (c *Container) makeBindMounts() error {
}
}
- if c.config.NetNsCtr != "" && (!c.config.NoCreateHosts || !c.config.NoCreateResolvConf) {
+ if c.config.NetNsCtr != "" && (!c.config.UseImageResolvConf || !c.config.UseImageHosts) {
// We share a net namespace.
// We want /etc/resolv.conf and /etc/hosts from the
// other container. Unless we're not creating both of
@@ -719,7 +719,7 @@ func (c *Container) makeBindMounts() error {
return errors.Wrapf(err, "error fetching bind mounts from dependency %s of container %s", depCtr.ID(), c.ID())
}
- if !c.config.NoCreateResolvConf {
+ if !c.config.UseImageResolvConf {
// The other container may not have a resolv.conf or /etc/hosts
// If it doesn't, don't copy them
resolvPath, exists := bindMounts["/etc/resolv.conf"]
@@ -728,7 +728,7 @@ func (c *Container) makeBindMounts() error {
}
}
- if !c.config.NoCreateHosts {
+ if !c.config.UseImageHosts {
// check if dependency container has an /etc/hosts file
hostsPath, exists := bindMounts["/etc/hosts"]
if !exists {
@@ -751,7 +751,7 @@ func (c *Container) makeBindMounts() error {
c.state.BindMounts["/etc/hosts"] = hostsPath
}
} else {
- if !c.config.NoCreateResolvConf {
+ if !c.config.UseImageResolvConf {
newResolv, err := c.generateResolvConf()
if err != nil {
return errors.Wrapf(err, "error creating resolv.conf for container %s", c.ID())
@@ -759,7 +759,7 @@ func (c *Container) makeBindMounts() error {
c.state.BindMounts["/etc/resolv.conf"] = newResolv
}
- if !c.config.NoCreateHosts {
+ if !c.config.UseImageHosts {
newHosts, err := c.generateHosts("/etc/hosts")
if err != nil {
return errors.Wrapf(err, "error creating hosts file for container %s", c.ID())