From 7144ad4cdce86676953461bc65d1958c4b71e32c Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Tue, 17 Oct 2017 15:38:24 +0300 Subject: [PATCH] Add netboot.xyz into quick boot options Fixes #46 --- pixiecore/cli/quickcmd.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pixiecore/cli/quickcmd.go b/pixiecore/cli/quickcmd.go index 998e1d4..e13c8d2 100644 --- a/pixiecore/cli/quickcmd.go +++ b/pixiecore/cli/quickcmd.go @@ -270,6 +270,22 @@ func archRecipe(parent *cobra.Command) { parent.AddCommand(archCmd) } +func netbootRecipe(parent *cobra.Command) { + var netbootCmd = &cobra.Command{ + Use: "netboot", + Short: "Boot a netboot.xyz installer", + Long: `https://network.xyz allows to boot multiple operating + systems and useful system utilities.`, + Run: func(cmd *cobra.Command, args []string) { + kernel := "https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn" + fmt.Println(staticFromFlags(cmd, kernel, []string {}, "").Serve()) + }, + } + serverConfigFlags(netbootCmd) + staticConfigFlags(netbootCmd) + parent.AddCommand(netbootCmd) +} + func init() { rootCmd.AddCommand(quickCmd) debianRecipe(quickCmd) @@ -277,6 +293,7 @@ func init() { fedoraRecipe(quickCmd) centosRecipe(quickCmd) //archRecipe(quickCmd) + netbootRecipe(quickCmd) // TODO: some kind of caching support where quick OSes get // downloaded locally, so you don't have to fetch from a remote