mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +00:00
sparkles: Minor enhancements (#239)
* 🐛 Fixup grub option quoting * ⚙️ Copy discovery to oem if found * ✨ Add environment block to install * ⚙️ Use /oem for mount in kcrypt post-hook * 📝 Update docs with installer env reference * 🤖 Add test deps * ⚙️ Be consistent and set env also for post-hooks * ⚙️ propagate env in post-hooks
This commit is contained in:
parent
5d8fd9e044
commit
e0f54f296e
@ -18,13 +18,15 @@ import (
|
||||
)
|
||||
|
||||
type Install struct {
|
||||
Auto bool `yaml:"auto,omitempty"`
|
||||
Reboot bool `yaml:"reboot,omitempty"`
|
||||
Device string `yaml:"device,omitempty"`
|
||||
Poweroff bool `yaml:"poweroff,omitempty"`
|
||||
GrubOptions map[string]string `yaml:"grub_options,omitempty"`
|
||||
Bundles Bundles `yaml:"bundles,omitempty"`
|
||||
Encrypt []string `yaml:"encrypted_partitions,omitempty"`
|
||||
Auto bool `yaml:"auto,omitempty"`
|
||||
Reboot bool `yaml:"reboot,omitempty"`
|
||||
Device string `yaml:"device,omitempty"`
|
||||
Poweroff bool `yaml:"poweroff,omitempty"`
|
||||
GrubOptions map[string]string `yaml:"grub_options,omitempty"`
|
||||
Bundles Bundles `yaml:"bundles,omitempty"`
|
||||
Encrypt []string `yaml:"encrypted_partitions,omitempty"`
|
||||
SkipEncryptCopyPlugins bool `yaml:"skip_copy_kcrypt_plugin,omitempty"`
|
||||
Env []string `yaml:"env,omitempty"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
|
@ -10,7 +10,9 @@ import (
|
||||
)
|
||||
|
||||
func SH(c string) (string, error) {
|
||||
o, err := exec.Command("/bin/sh", "-c", c).CombinedOutput()
|
||||
cmd := exec.Command("/bin/sh", "-c", c)
|
||||
cmd.Env = os.Environ()
|
||||
o, err := cmd.CombinedOutput()
|
||||
return string(o), err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user