Mount the filesystems we need so this can run as PID 1

This commit is contained in:
flamingcow
2026-07-26 10:54:19 -07:00
parent 5e2b36bdaa
commit 832a2b42d6
5 changed files with 101 additions and 16 deletions
+10 -15
View File
@@ -637,10 +637,11 @@ func main() {
)
flag.Parse()
// Nothing here is recoverable by the time it reaches this point, and as PID 1
// a plain exit would panic the kernel anyway with less to show for it.
if err := run(*aName, *bName, *sizesArg,
*streams, *batch, *nsPerM); err != nil {
fmt.Fprintln(os.Stderr, "error:", err)
os.Exit(1)
panic(err)
}
}
@@ -665,6 +666,11 @@ func run(aName, bName, sizesArg string,
if err != nil {
return err
}
if err := reportChecks("MOUNTS", mountFilesystems()); err != nil {
return err
}
a, err := lookupEndpoint(aName)
if err != nil {
return err
@@ -692,19 +698,8 @@ func run(aName, bName, sizesArg string,
ethertypes[i] = uint16(etherBase + i)
}
var fatal []string
var tuneRows [][]string
for _, r := range configureSystem(ifnames, ethertypes) {
tuneRows = append(tuneRows, []string{r.item, r.status(), r.detail()})
if r.fatal {
fatal = append(fatal, r.item)
}
}
fmt.Println(renderBox("HOST SETTINGS",
[]string{"CHECK", "STATUS", "DETAIL"},
[]bool{false, false, false}, tuneRows))
if len(fatal) > 0 {
return fmt.Errorf("cannot test with %s in this state", strings.Join(fatal, ", "))
if err := reportChecks("HOST SETTINGS", configureSystem(ifnames, ethertypes)); err != nil {
return err
}
cfg := config{