remove boot-v1

This commit is contained in:
Mikaël Cluseau
2024-01-20 17:26:28 +01:00
parent 6bf1d1ccf2
commit 5fd3a9d925
5 changed files with 19 additions and 109 deletions

View File

@ -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)
}