🌱 Read os-release attributes using kairos prefix (#12)

* Read os-release attributes using kairos prefix

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Refactor other functions to use OSRelease

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Misc refactoring

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
Mauro Morales
2023-04-14 11:40:28 +02:00
committed by GitHub
parent 77ed7ba298
commit 0c9d2bd9e6
2 changed files with 29 additions and 12 deletions

View File

@@ -154,10 +154,8 @@ func detectSystem(r *Runtime) {
func detectKairos(r *Runtime) {
k := &Kairos{}
flavor, err := utils.OSRelease("FLAVOR")
if err == nil {
k.Flavor = flavor
}
k.Flavor = utils.Flavor()
v, err := utils.OSRelease("VERSION")
if err == nil {
k.Version = v