Do not do anything if rd.cos.disable its on the cmdline

That means we dont want to run any immutable stuff, for netboot and
cdrom

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
Itxaka
2023-02-15 10:53:48 +01:00
parent 220641df60
commit 28e6cfbff8
2 changed files with 12 additions and 6 deletions

View File

@@ -8,8 +8,8 @@ import (
"strings"
)
// BootedFromCD tells us if we are currently runnig of the LiveCD
func BootedFromCD() (bool, error) {
// BootedFromLiveMedia tells us if we are currently running off LIVE media like cd/usb or netboot
func BootedFromLiveMedia() (bool, error) {
runtime, err := state.NewRuntime()
if err != nil {
return false, err
@@ -151,4 +151,4 @@ func SetSentinelFile() error {
return err
}
return nil
}
}