1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Move sysinit to cmd

This commit is contained in:
Darren Shepherd
2015-02-19 13:58:29 -07:00
parent 81e15fc46f
commit fb8b4a88fb
2 changed files with 3 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ import (
"github.com/rancherio/os/util" "github.com/rancherio/os/util"
) )
func SysInit() { func Main() {
if err := sysInit(); err != nil { if err := sysInit(); err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@@ -9,10 +9,10 @@ import (
"github.com/rancherio/os/cmd/control" "github.com/rancherio/os/cmd/control"
"github.com/rancherio/os/cmd/power" "github.com/rancherio/os/cmd/power"
"github.com/rancherio/os/cmd/respawn" "github.com/rancherio/os/cmd/respawn"
"github.com/rancherio/os/cmd/sysinit"
"github.com/rancherio/os/cmd/systemdocker" "github.com/rancherio/os/cmd/systemdocker"
"github.com/rancherio/os/cmd/tlsconf" "github.com/rancherio/os/cmd/tlsconf"
osInit "github.com/rancherio/os/init" osInit "github.com/rancherio/os/init"
"github.com/rancherio/os/sysinit"
) )
func registerCmd(cmd string, mainFunc func()) { func registerCmd(cmd string, mainFunc func()) {
@@ -35,7 +35,7 @@ func registerCmd(cmd string, mainFunc func()) {
func main() { func main() {
registerCmd("/init", osInit.MainInit) registerCmd("/init", osInit.MainInit)
registerCmd(osInit.SYSINIT, sysinit.SysInit) registerCmd(osInit.SYSINIT, sysinit.Main)
registerCmd("/usr/bin/system-docker", systemdocker.Main) registerCmd("/usr/bin/system-docker", systemdocker.Main)
registerCmd("/sbin/poweroff", power.PowerOff) registerCmd("/sbin/poweroff", power.PowerOff)
registerCmd("/sbin/reboot", power.Reboot) registerCmd("/sbin/reboot", power.Reboot)