remove boot-v1
This commit is contained in:
@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gopkg.in/yaml.v3"
|
||||
@ -99,3 +100,11 @@ func bootV2() {
|
||||
// finalize
|
||||
finalizeBoot()
|
||||
}
|
||||
|
||||
func finalizeBoot() {
|
||||
// switch root
|
||||
log.Info().Msg("switching root")
|
||||
err := syscall.Exec("/sbin/switch_root", []string{"switch_root",
|
||||
"-c", "/dev/console", "/system", "/sbin/init"}, os.Environ())
|
||||
fatal("switch_root failed: ", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user