mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +00:00
Working out why linuxkit crashes in bootup by labeling init stages
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
15
main.go
15
main.go
@@ -1,6 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/containernetworking/cni/plugins/ipam/host-local"
|
||||
"github.com/containernetworking/cni/plugins/main/bridge"
|
||||
"github.com/docker/docker/docker"
|
||||
@@ -42,6 +45,18 @@ var entrypoints = map[string]func(){
|
||||
}
|
||||
|
||||
func main() {
|
||||
if 0 == 1 {
|
||||
// TODO: move this into a "dev/debug +build"
|
||||
fmt.Fprintf(os.Stderr, "ros main(%s) ppid:%d - print to stdio\n", os.Args[0], os.Getppid())
|
||||
|
||||
filename := "/dev/kmsg"
|
||||
f, err := os.OpenFile(filename, os.O_WRONLY, 0644)
|
||||
if err == nil {
|
||||
fmt.Fprintf(f, "ros main(%s) ppid:%d - print to %s\n", os.Args[0], os.Getppid(), filename)
|
||||
}
|
||||
f.Close()
|
||||
}
|
||||
|
||||
for name, f := range entrypoints {
|
||||
reexec.Register(name, f)
|
||||
}
|
||||
|
Reference in New Issue
Block a user