Rewrite rc.local, not append
This commit is contained in:
parent
0f24022b95
commit
a06ccea904
@ -143,7 +143,7 @@ func generateImage(repo, release, path, size string) (err error) {
|
|||||||
|
|
||||||
log.Println("Add dhclient to rc.local")
|
log.Println("Add dhclient to rc.local")
|
||||||
stdout, stderr, _, err = runInChroot(tmpdir,
|
stdout, stderr, _, err = runInChroot(tmpdir,
|
||||||
"echo '#!/bin/sh\ndhclient' >> /etc/rc.local"+
|
"echo '#!/bin/sh\ndhclient' > /etc/rc.local"+
|
||||||
" && chmod +x /etc/rc.local")
|
" && chmod +x /etc/rc.local")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(stdout, stderr)
|
log.Println(stdout, stderr)
|
||||||
|
Loading…
Reference in New Issue
Block a user