mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-25 13:33:41 +00:00
set configScanDir as package scoped var (#264)
set config.Install.env variables in environment adding env to config to use across all stages switch to config.Scan to read config
This commit is contained in:
@@ -15,6 +15,8 @@ import (
|
|||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var configScanDir = []string{"/oem", "/usr/local/cloud-config", "/run/initramfs/live"}
|
||||||
|
|
||||||
var cmds = []cli.Command{
|
var cmds = []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "upgrade",
|
Name: "upgrade",
|
||||||
@@ -74,8 +76,7 @@ See https://kairos.io/after_install/upgrades/#manual for documentation.
|
|||||||
if len(args) == 1 {
|
if len(args) == 1 {
|
||||||
v = args[0]
|
v = args[0]
|
||||||
}
|
}
|
||||||
|
return agent.Upgrade(v, c.String("image"), c.Bool("force"), c.Bool("debug"), configScanDir)
|
||||||
return agent.Upgrade(v, c.String("image"), c.Bool("force"), c.Bool("debug"))
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -294,7 +295,7 @@ See also https://kairos.io/installation/device_pairing/ for documentation.
|
|||||||
This command is meant to be used from the boot GRUB menu, but can be started manually`,
|
This command is meant to be used from the boot GRUB menu, but can be started manually`,
|
||||||
Aliases: []string{"i"},
|
Aliases: []string{"i"},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
return agent.Install("/oem", "/usr/local/cloud-config", "/run/initramfs/live")
|
return agent.Install(configScanDir...)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -318,7 +319,7 @@ This command is meant to be used from the boot GRUB menu, but can likely be used
|
|||||||
{
|
{
|
||||||
Name: "reset",
|
Name: "reset",
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
return agent.Reset()
|
return agent.Reset(configScanDir...)
|
||||||
},
|
},
|
||||||
Usage: "Starts kairos reset mode",
|
Usage: "Starts kairos reset mode",
|
||||||
Description: `
|
Description: `
|
||||||
|
Reference in New Issue
Block a user