1
0
mirror of https://github.com/rancher/os.git synced 2025-09-15 22:49:08 +00:00

get started on the new cli

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-03-06 12:52:52 +10:00
parent 93cd0877dd
commit dc540a0cf0
6 changed files with 195 additions and 41 deletions

View File

@@ -22,6 +22,7 @@ import (
"github.com/rancher/os/compose"
"github.com/rancher/os/config"
"github.com/rancher/os/docker"
"github.com/rancher/os/util"
)
type Images struct {
@@ -226,7 +227,7 @@ func startUpgradeContainer(image string, stage, force, reboot, kexec bool, upgra
if len(imageSplit) > 1 && imageSplit[1] == config.Version+config.Suffix {
confirmation = fmt.Sprintf("Already at version %s. Continue anyway", imageSplit[1])
}
if !force && !yes(confirmation) {
if !force && !util.Yes(confirmation) {
os.Exit(1)
}
@@ -276,7 +277,7 @@ func startUpgradeContainer(image string, stage, force, reboot, kexec bool, upgra
return err
}
if reboot && (force || yes("Continue with reboot")) {
if reboot && (force || util.Yes("Continue with reboot")) {
log.Info("Rebooting")
power.Reboot()
}