mirror of
https://github.com/bdnugget/eggos.git
synced 2026-11-07 04:17:27 +00:00
18 lines
346 B
Go
18 lines
346 B
Go
package fs
|
|
|
|
import "github.com/spf13/afero"
|
|
|
|
var builtinFiles = map[string]string{
|
|
"/etc/resolv.conf": `nameserver 114.114.114.114`,
|
|
"/proc/sys/kernel/hostname": `eggos`,
|
|
}
|
|
|
|
func etcInit() {
|
|
for name, content := range builtinFiles {
|
|
err := afero.WriteFile(Root, name, []byte(content), 0644)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
}
|