Mount the filesystems we need so this can run as PID 1
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user