1
0
mirror of https://github.com/rancher/os.git synced 2025-09-05 00:37:12 +00:00
This commit is contained in:
Darren Shepherd
2015-02-23 12:00:33 -07:00
parent dac9b7e21e
commit 1c5ac9f410
5 changed files with 50 additions and 50 deletions

View File

@@ -65,7 +65,7 @@ func osRollback(c *cli.Context) {
fileReader := bufio.NewScanner(file) fileReader := bufio.NewScanner(file)
line := " " line := " "
for ; line[len(line)-1:] != "*"; { for line[len(line)-1:] != "*" {
if !fileReader.Scan() { if !fileReader.Scan() {
log.Error("Current version not indicated in " + osVersionsFile) log.Error("Current version not indicated in " + osVersionsFile)
} }
@@ -81,7 +81,8 @@ func osRollback(c *cli.Context) {
} }
func osMetaDataGet(c *cli.Context) { func osMetaDataGet(c *cli.Context) {
osChannel, ok := getChannelUrl("meta"); if !ok { osChannel, ok := getChannelUrl("meta")
if !ok {
log.Fatal("unrecognized channel meta") log.Fatal("unrecognized channel meta")
} }
resp, err := http.Get(osChannel) resp, err := http.Get(osChannel)
@@ -161,7 +162,8 @@ func getLatestImage(channel string) (string, error) {
} else { } else {
pivot = channel pivot = channel
} }
osChannel, ok := getChannelUrl(pivot); if !ok { osChannel, ok := getChannelUrl(pivot)
if !ok {
return "", errors.New("unrecognized channel " + pivot) return "", errors.New("unrecognized channel " + pivot)
} }
resp, err := http.Get(osChannel) resp, err := http.Get(osChannel)
@@ -191,7 +193,6 @@ func getChannelUrl(channel string) (string, bool) {
"meta": "", "meta": "",
} }
} }
channel, ok := osChannels[channel]; channel, ok := osChannels[channel]
return channel, ok return channel, ok
} }

View File

@@ -100,7 +100,6 @@ func tlsConfCreate(c *cli.Context) {
serverKeyPath = "client-key.pem" serverKeyPath = "client-key.pem"
} }
serverCertPath = filepath.Join(outDir, serverCertPath) serverCertPath = filepath.Join(outDir, serverCertPath)
serverKeyPath = filepath.Join(outDir, serverKeyPath) serverKeyPath = filepath.Join(outDir, serverKeyPath)

View File

@@ -8,8 +8,8 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/fsouza/go-dockerclient"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/fsouza/go-dockerclient"
) )
const ( const (