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

Revert "Revert "Storage""

This reverts commit 7b2bf93271.
This commit is contained in:
Darren Shepherd
2015-08-27 12:24:26 -07:00
parent eed4057f5f
commit 72be1d11e6
74 changed files with 6422 additions and 33 deletions

View File

@@ -131,13 +131,19 @@ 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")
}
@@ -161,6 +167,5 @@ func generate(c *cli.Context) error {
return err
}
hostnames := c.StringSlice("hostname")
return writeCerts(generateServer, hostnames, cfg, certPath, keyPath, caCertPath, caKeyPath)
}