mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-04-27 11:21:44 +00:00
sparkles: Add manual-install
This commit is contained in:
parent
25c0da20cb
commit
6fc5aa32a7
@ -199,6 +199,42 @@ This command is meant to be used from the boot GRUB menu, but can be also starte
|
||||
return agent.InteractiveInstall(c.Bool("shell"))
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "manual-install",
|
||||
Usage: "Starts the manual installation",
|
||||
Description: `
|
||||
`,
|
||||
Aliases: []string{"m"},
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "device",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "poweroff",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "reboot",
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
if c.NArg() == 0 {
|
||||
return fmt.Errorf("expect one argument. the config file - if you don't have it, use the interactive-install")
|
||||
}
|
||||
config := c.Args().First()
|
||||
|
||||
options := map[string]string{"device": c.String("device")}
|
||||
|
||||
if c.Bool("poweroff") {
|
||||
options["poweroff"] = "true"
|
||||
}
|
||||
|
||||
if c.Bool("reboot") {
|
||||
options["reboot"] = "true"
|
||||
}
|
||||
return agent.ManualInstall(config, options)
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
Name: "install",
|
||||
Usage: "Starts the c3os pairing installation",
|
||||
|
Loading…
Reference in New Issue
Block a user