1
0
mirror of https://github.com/rancher/os.git synced 2025-06-30 16:51:47 +00:00

gofmt change

This commit is contained in:
Darren Shepherd 2015-02-19 13:47:06 -07:00
parent 7e8acab1fd
commit ace2fa1f65
3 changed files with 12 additions and 14 deletions

View File

@ -67,8 +67,8 @@ var (
sshKeyName string sshKeyName string
oem string oem string
validate bool validate bool
preInit bool preInit bool
outDir string outDir string
}{} }{}
) )
@ -239,12 +239,12 @@ func CloudInit() {
} }
outFile := outDir + "cloud-config" outFile := outDir + "cloud-config"
if err := ioutil.WriteFile(outFile, fileData, 444); err != nil { if err := ioutil.WriteFile(outFile, fileData, 444); err != nil {
fmt.Println("Error while writing file ", err.Error()) fmt.Println("Error while writing file ", err.Error())
os.Exit(1) os.Exit(1)
} }
os.Exit(0) os.Exit(0)
} }
@ -403,4 +403,3 @@ func runScript(script config.Script, env *initialize.Environment) error {
} }
return err return err
} }

View File

@ -46,17 +46,17 @@ type Config struct {
RescueContainer *ContainerConfig `yaml:"rescue_container,omitempty"` RescueContainer *ContainerConfig `yaml:"rescue_container,omitempty"`
State ConfigState `yaml:"state,omitempty"` State ConfigState `yaml:"state,omitempty"`
Userdocker UserDockerInfo `yaml:"userdocker,omitempty"` Userdocker UserDockerInfo `yaml:"userdocker,omitempty"`
CloudConfig []string `yaml:"cloud_config,omitempty"` CloudConfig []string `yaml:"cloud_config,omitempty"`
SystemContainers []ContainerConfig `yaml:"system_containers,omitempty"` SystemContainers []ContainerConfig `yaml:"system_containers,omitempty"`
SystemDockerArgs []string `yaml:"system_docker_args,flow,omitempty"` SystemDockerArgs []string `yaml:"system_docker_args,flow,omitempty"`
Modules []string `yaml:"modules,omitempty"` Modules []string `yaml:"modules,omitempty"`
} }
type UserDockerInfo struct { type UserDockerInfo struct {
UseTLS bool `yaml:"use_tls,omitempty"` UseTLS bool `yaml:"use_tls,omitempty"`
TLSServerCert string `yaml:"tls_server_cert"` TLSServerCert string `yaml:"tls_server_cert"`
TLSServerKey string `yaml:"tls_server_key"` TLSServerKey string `yaml:"tls_server_key"`
TLSCACert string `yaml:"tls_ca_cert"` TLSCACert string `yaml:"tls_ca_cert"`
} }
type ConfigState struct { type ConfigState struct {

View File

@ -15,8 +15,8 @@ func NewConfig() *Config {
SystemDockerArgs: []string{"docker", "-d", "-s", "overlay", "-b", "none", "--restart=false", "-H", DOCKER_SYSTEM_HOST}, SystemDockerArgs: []string{"docker", "-d", "-s", "overlay", "-b", "none", "--restart=false", "-H", DOCKER_SYSTEM_HOST},
Modules: []string{}, Modules: []string{},
Userdocker: UserDockerInfo{ Userdocker: UserDockerInfo{
UseTLS: true, UseTLS: true,
}, },
CloudConfig: []string{}, CloudConfig: []string{},
SystemContainers: []ContainerConfig{ SystemContainers: []ContainerConfig{
{ {
@ -32,7 +32,6 @@ func NewConfig() *Config {
Cmd: "--name=console-volumes " + Cmd: "--name=console-volumes " +
"--net=none " + "--net=none " +
"--read-only " + "--read-only " +
"-v=/init:/sbin/halt:ro " + "-v=/init:/sbin/halt:ro " +
"-v=/init:/sbin/poweroff:ro " + "-v=/init:/sbin/poweroff:ro " +
"-v=/init:/sbin/reboot:ro " + "-v=/init:/sbin/reboot:ro " +
@ -61,7 +60,7 @@ func NewConfig() *Config {
"--net=host " + "--net=host " +
"-v=/init:/usr/bin/rancherctl:ro " + "-v=/init:/usr/bin/rancherctl:ro " +
"-v=/init:/usr/bin/cloudinit:ro " + "-v=/init:/usr/bin/cloudinit:ro " +
"cloudconfig", "cloudconfig",
}, },
{ {
Cmd: "--name=network " + Cmd: "--name=network " +