sparkles: Add manual-install

This commit is contained in:
Ettore Di Giacinto 2022-09-10 13:01:03 +00:00 committed by Itxaka
parent 25c0da20cb
commit 6fc5aa32a7

View File

@ -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",