1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 06:59:12 +00:00

Revert "Storage"

This commit is contained in:
Ivan Mikushin
2015-08-27 18:33:26 +05:00
parent 94269475c2
commit 7b2bf93271
74 changed files with 31 additions and 6420 deletions

View File

@@ -131,19 +131,13 @@ func tlsConfCreate(c *cli.Context) {
}
func generate(c *cli.Context) error {
generateServer := c.Bool("server")
outDir := c.String("dir")
hostnames := c.StringSlice("hostname")
return Generate(generateServer, outDir, hostnames)
}
func Generate(generateServer bool, outDir string, hostnames []string) error {
cfg, err := config.LoadConfig()
if err != nil {
return err
}
generateServer := c.Bool("server")
outDir := c.String("dir")
if outDir == "" {
return fmt.Errorf("out directory (-d, --dir) not specified")
}
@@ -167,5 +161,6 @@ func Generate(generateServer bool, outDir string, hostnames []string) error {
return err
}
hostnames := c.StringSlice("hostname")
return writeCerts(generateServer, hostnames, cfg, certPath, keyPath, caCertPath, caKeyPath)
}