Skip to content
Snippets Groups Projects
Commit c60bc508 authored by kaiyou's avatar kaiyou
Browse files

Set a hosts file when selfcontaining

parent d4333212
Branches master
Tags v0.2.2
No related merge requests found
......@@ -175,6 +175,10 @@ func setupDNS(servers []net.IP, etc string) error {
}
resolv := []byte(strings.Join(lines, "\n"))
err := ioutil.WriteFile(path.Join(etc, "resolv.conf"), resolv, 0644)
if err != nil {
return err
}
err = ioutil.WriteFile(path.Join(etc, "hosts"), []byte("::1 localhost"), 0644)
return err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment