forked from rosa/hakurei
cmd/mbf: register binfmt entry for shell
This fixes --arch for shell. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1052,6 +1052,13 @@ func main() {
|
||||
Bind(tempdir, fhs.AbsTmp, std.BindWritable).
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user