1
0
mirror of https://github.com/rancher/os.git synced 2025-06-26 23:06:51 +00:00
os/cmd/network/network.go
Wang Long 9e15059789 Replace rancherio with rancher
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2015-10-12 19:50:57 +08:00

27 lines
453 B
Go

package network
import (
"fmt"
"os"
log "github.com/Sirupsen/logrus"
"github.com/rancher/netconf"
"github.com/rancher/os/config"
)
func Main() {
args := os.Args
if len(args) > 1 {
fmt.Println("call " + args[0] + " to load network config from cloud-config.yml")
return
}
cfg, err := config.LoadConfig()
if err != nil {
log.Fatal(err)
}
if err := netconf.ApplyNetworkConfigs(&cfg.Rancher.Network); err != nil {
log.Fatal(err)
}
}