arrow_up: Bump repository and drop some workarounds (#434)

* ⬆️ Bump Kairos repositories

Signed-off-by: Ettore Di Giacinto <mudler@mocaccino.org>

* 🐧 Find out which grub to call

Signed-off-by: Ettore Di Giacinto <mudler@mocaccino.org>

Signed-off-by: Ettore Di Giacinto <mudler@mocaccino.org>
This commit is contained in:
Ettore Di Giacinto 2022-11-16 11:44:18 +01:00 committed by Itxaka
parent fd39b2fa79
commit ad8fc74813

View File

@ -4,6 +4,7 @@ import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
"github.com/denisbrodbeck/machineid"
@ -136,3 +137,15 @@ func ExecuteCloudConfig(file, stage string) error {
_, err := utils.SH(fmt.Sprintf("elemental run-stage -s %s %s", stage, file))
return err
}
func FindCommand(def string, options []string) string {
for _, p := range options {
path, err := exec.LookPath(p)
if err == nil {
return path
}
}
// Otherwise return default
return def
}