cmd/mbf: register binfmt entry for shell

This fixes --arch for shell.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-10 12:51:09 +09:00
parent 928a9f61e9
commit f333b8fbd6
+7
View File
@@ -1052,6 +1052,13 @@ func main() {
Bind(tempdir, fhs.AbsTmp, std.BindWritable). Bind(tempdir, fhs.AbsTmp, std.BindWritable).
Proc(fhs.AbsProc).Dev(fhs.AbsDev, true) Proc(fhs.AbsProc).Dev(fhs.AbsDev, true)
if flagArch != "" && flagArch != runtime.GOARCH {
if entry, ok := pkg.Arch()[flagArch]; ok {
z.InitAsRoot = true
z.Binfmt = []container.BinfmtEntry{entry}
}
}
if err := z.Start(); err != nil { if err := z.Start(); err != nil {
return err return err
} }