1
0

Rewrite rc.local, not append

This commit is contained in:
dump_stack() 2018-10-06 18:15:29 +00:00
parent 0f24022b95
commit a06ccea904

View File

@ -143,7 +143,7 @@ func generateImage(repo, release, path, size string) (err error) {
log.Println("Add dhclient to rc.local")
stdout, stderr, _, err = runInChroot(tmpdir,
"echo '#!/bin/sh\ndhclient' >> /etc/rc.local"+
"echo '#!/bin/sh\ndhclient' > /etc/rc.local"+
" && chmod +x /etc/rc.local")
if err != nil {
log.Println(stdout, stderr)