123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package main
- import (
- "github.com/containernetworking/cni/plugins/ipam/host-local"
- "github.com/containernetworking/cni/plugins/main/bridge"
- "github.com/docker/docker/docker"
- "github.com/docker/docker/pkg/reexec"
- "github.com/rancher/cniglue"
- "github.com/rancher/docker-from-scratch"
- "github.com/rancher/os/cmd/cloudinitexecute"
- "github.com/rancher/os/cmd/cloudinitsave"
- "github.com/rancher/os/cmd/console"
- "github.com/rancher/os/cmd/control"
- "github.com/rancher/os/cmd/dockerinit"
- "github.com/rancher/os/cmd/network"
- "github.com/rancher/os/cmd/power"
- "github.com/rancher/os/cmd/respawn"
- "github.com/rancher/os/cmd/switchconsole"
- "github.com/rancher/os/cmd/sysinit"
- "github.com/rancher/os/cmd/systemdocker"
- "github.com/rancher/os/cmd/userdocker"
- "github.com/rancher/os/cmd/wait"
- osInit "github.com/rancher/os/init"
- )
- var entrypoints = map[string]func(){
- "cloud-init-execute": cloudinitexecute.Main,
- "cloud-init-save": cloudinitsave.Main,
- "console": console.Main,
- "console.sh": console.Main,
- "docker": docker.Main,
- "docker-init": dockerinit.Main,
- "dockerlaunch": dockerlaunch.Main,
- "halt": power.Halt,
- "init": osInit.MainInit,
- "netconf": network.Main,
- "poweroff": power.PowerOff,
- "reboot": power.Reboot,
- "respawn": respawn.Main,
- "ros-sysinit": sysinit.Main,
- "shutdown": power.Main,
- "switch-console": switchconsole.Main,
- "system-docker": systemdocker.Main,
- "user-docker": userdocker.Main,
- "wait-for-docker": wait.Main,
- "cni-glue": glue.Main,
- "bridge": bridge.Main,
- "host-local": hostlocal.Main,
- }
- func main() {
- for name, f := range entrypoints {
- reexec.Register(name, f)
- }
- if !reexec.Init() {
- control.Main()
- }
- }
|