mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-04-28 03:32:27 +00:00
Also refuse to do it on unkown media
Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
parent
40da5fa451
commit
009c7a6677
4
main.go
4
main.go
@ -151,7 +151,7 @@ See https://kairos.io/docs/upgrade/manual/ for documentation.
|
||||
return err
|
||||
}
|
||||
if bootFromLiveMedia() {
|
||||
return fmt.Errorf("cannot upgrade from live media")
|
||||
return fmt.Errorf("cannot upgrade from live media/unknown boot state")
|
||||
}
|
||||
|
||||
return checkRoot()
|
||||
@ -846,7 +846,7 @@ func bootFromLiveMedia() bool {
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if r.BootState == state.LiveCD {
|
||||
if r.BootState == state.LiveCD || r.BootState == state.Unknown {
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user