Mount the filesystems we need so this can run as PID 1
This commit is contained in:
@@ -282,6 +282,24 @@ func (r checkResult) detail() string {
|
||||
return r.state
|
||||
}
|
||||
|
||||
func reportChecks(title string, results []checkResult) error {
|
||||
var rows [][]string
|
||||
var fatal []string
|
||||
for _, r := range results {
|
||||
rows = append(rows, []string{r.item, r.status(), r.detail()})
|
||||
if r.fatal {
|
||||
fatal = append(fatal, r.item)
|
||||
}
|
||||
}
|
||||
fmt.Println(renderBox(title,
|
||||
[]string{"CHECK", "STATUS", "DETAIL"},
|
||||
[]bool{false, false, false}, rows))
|
||||
if len(fatal) > 0 {
|
||||
return fmt.Errorf("cannot test with %s in this state", strings.Join(fatal, ", "))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ethtoolCall(fd int, ifname string, data unsafe.Pointer) error {
|
||||
var ifr dataIfreq
|
||||
if len(ifname) >= unix.IFNAMSIZ {
|
||||
|
||||
Reference in New Issue
Block a user