mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-17 07:46:53 +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
|
return err
|
||||||
}
|
}
|
||||||
if bootFromLiveMedia() {
|
if bootFromLiveMedia() {
|
||||||
return fmt.Errorf("cannot upgrade from live media")
|
return fmt.Errorf("cannot upgrade from live media/unknown boot state")
|
||||||
}
|
}
|
||||||
|
|
||||||
return checkRoot()
|
return checkRoot()
|
||||||
@ -846,7 +846,7 @@ func bootFromLiveMedia() bool {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if r.BootState == state.LiveCD {
|
if r.BootState == state.LiveCD || r.BootState == state.Unknown {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user