mirror of
https://github.com/kairos-io/immucore.git
synced 2025-06-23 05:17:55 +00:00
16 lines
268 B
Go
16 lines
268 B
Go
package utils
|
|
|
|
import (
|
|
"github.com/kairos-io/kairos/sdk/state"
|
|
"github.com/twpayne/go-vfs"
|
|
)
|
|
|
|
func BootedFromCD(fs vfs.FS) (bool, error) {
|
|
runtime, err := state.NewRuntime()
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
|
|
return runtime.BootState == state.LiveCD, nil
|
|
}
|