1
0
mirror of https://github.com/rancher/os.git synced 2025-07-20 09:59:03 +00:00

fix default console detection

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2017-07-17 14:07:35 +10:00
parent 7cb46e1919
commit ce9ae25741

View File

@ -182,6 +182,10 @@ func CurrentConsole() (console string) {
return return
} }
if strings.Contains(image.Name(), "os-console") {
console = "default"
return
}
console = strings.TrimPrefix(strings.TrimSuffix(image.Name(), "console"), "rancher/os-") console = strings.TrimPrefix(strings.TrimSuffix(image.Name(), "console"), "rancher/os-")
return return
} }