mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-07-15 08:51:41 +00:00
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:
parent
fd39b2fa79
commit
ad8fc74813
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user