Skip to content

Commit

Permalink
Support identifying recovery via recovery-mode stanza (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Feb 1, 2024
1 parent c21aa7f commit 89782e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func detectBoot() Boot {
return Active
case strings.Contains(cmdlineS, "COS_PASSIVE"):
return Passive
case strings.Contains(cmdlineS, "COS_RECOVERY"), strings.Contains(cmdlineS, "COS_SYSTEM"):
case strings.Contains(cmdlineS, "COS_RECOVERY"), strings.Contains(cmdlineS, "COS_SYSTEM"), strings.Contains(cmdlineS, "recovery-mode"):
return Recovery
case strings.Contains(cmdlineS, "live:LABEL"), strings.Contains(cmdlineS, "live:CDLABEL"), strings.Contains(cmdlineS, "netboot"):
return LiveCD
Expand All @@ -146,7 +146,7 @@ func DetectBootWithVFS(fs types.KairosFS) (Boot, error) {
return Active, nil
case strings.Contains(cmdlineS, "COS_PASSIVE"):
return Passive, nil
case strings.Contains(cmdlineS, "COS_RECOVERY"), strings.Contains(cmdlineS, "COS_SYSTEM"):
case strings.Contains(cmdlineS, "COS_RECOVERY"), strings.Contains(cmdlineS, "COS_SYSTEM"), strings.Contains(cmdlineS, "recovery-mode"):
return Recovery, nil
case strings.Contains(cmdlineS, "live:LABEL"), strings.Contains(cmdlineS, "live:CDLABEL"), strings.Contains(cmdlineS, "netboot"):
return LiveCD, nil
Expand Down

0 comments on commit 89782e9

Please sign in to comment.