mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-24 12:27:06 +00:00
Check role of efi conf with prefix (#71)
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
@@ -154,12 +154,16 @@ func getUKIBootState(logger zerolog.Logger) Boot {
|
||||
|
||||
logger.Debug().Msg("Current entry: " + currentEntry)
|
||||
|
||||
if !strings.HasSuffix(currentEntry, ".conf") {
|
||||
return Unknown
|
||||
}
|
||||
|
||||
switch {
|
||||
case strings.HasSuffix(currentEntry, "active.conf"):
|
||||
case strings.HasPrefix(currentEntry, "active"):
|
||||
return Active
|
||||
case strings.HasSuffix(currentEntry, "passive.conf"):
|
||||
case strings.HasPrefix(currentEntry, "passive"):
|
||||
return Passive
|
||||
case strings.HasSuffix(currentEntry, "recovery.conf"):
|
||||
case strings.HasPrefix(currentEntry, "recovery"):
|
||||
return Recovery
|
||||
default:
|
||||
return Unknown
|
||||
|
Reference in New Issue
Block a user