|
|
|
@ -75,8 +75,10 @@ func (h *Host) setupDNSInZone(c *pod.Container, n *opcNet.Network) error {
|
|
|
|
|
logrus.Debugf("setting up nsswitch.conf inside %s(%s)", c.UUID, c.Name) |
|
|
|
|
nsswitchDnsPath := filepath.Join(c.Zone.Zonepath, "root/etc/nsswitch.dns") |
|
|
|
|
nsswitchConfPath := filepath.Join(c.Zone.Zonepath, "root/etc/nsswitch.conf") |
|
|
|
|
if _, err := fileutils.CopyFile(nsswitchDnsPath, nsswitchConfPath); err != nil { |
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
if _, err := os.Stat(nsswitchDnsPath); err == nil { |
|
|
|
|
if _, err := fileutils.CopyFile(nsswitchDnsPath, nsswitchConfPath); err != nil { |
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//render /etc/ipadm/ipadm.conf inside the zone
|
|
|
|
|