Report errors from rewriting /etc/hosts
This commit is contained in:
1 parent
c16653a396
commit
79d65bc98b
2 files changed
+6
-3
No files matched your search
+1
-2
@@ -20,8 +20,7 @@ func (proxy *Proxy) RewriteEtcHosts(hostsPath, fqdn string, ips []*net.IPNet, ex
|
||||
contents := buf.String()
|
||||
cmdLine := fmt.Sprintf("echo '%s' > %s && rm -f %s && echo '%s' > %s", contents, mntHosts, mntHosts, contents, mntHosts)
|
||||
mounts := []string{hostsPathDir + ":" + mnt}
|
||||
proxy.runTransientContainer([]string{"sh"}, []string{"-c", cmdLine}, mounts)
|
||||
return nil
|
||||
return proxy.runTransientContainer([]string{"sh"}, []string{"-c", cmdLine}, mounts)
|
||||
}
|
||||
|
||||
// we assume (for compatibility with the weave script) that fqdn has a dot
|
||||
|
||||
Reference in new issue
Block a user