mirror of
https://github.com/danderson/netboot.git
synced 2025-10-15 01:21:40 +02:00
Delete dead code.
This commit is contained in:
parent
52a742156e
commit
bcaa633b65
2
Makefile
2
Makefile
@ -31,7 +31,7 @@ ci-test:
|
||||
ci-lint:
|
||||
$(GOCMD) get -u github.com/alecthomas/gometalinter
|
||||
gometalinter --install golint
|
||||
gometalinter --deadline=1m --disable-all --enable=gofmt --enable=golint --enable=vet --enable=structcheck --enable=unconvert --vendor ./...
|
||||
gometalinter --deadline=1m --disable-all --enable=gofmt --enable=golint --enable=vet --enable=deadcode --enable=structcheck --enable=unconvert --vendor ./...
|
||||
|
||||
.PHONY: update-ipxe
|
||||
update-ipxe:
|
||||
|
@ -27,10 +27,6 @@ import (
|
||||
"golang.org/x/net/ipv4"
|
||||
)
|
||||
|
||||
const (
|
||||
udpProtocolNumber = 17
|
||||
)
|
||||
|
||||
type linuxConn struct {
|
||||
port uint16
|
||||
conn *ipv4.RawConn
|
||||
|
@ -64,10 +64,6 @@ func fatalf(msg string, args ...interface{}) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func todo(msg string, args ...interface{}) {
|
||||
fatalf("TODO: "+msg, args...)
|
||||
}
|
||||
|
||||
func staticConfigFlags(cmd *cobra.Command) {
|
||||
cmd.Flags().String("cmdline", "", "Kernel commandline arguments")
|
||||
cmd.Flags().String("bootmsg", "", "Message to print on machines before booting")
|
||||
|
@ -241,35 +241,6 @@ func centosRecipe(parent *cobra.Command) {
|
||||
parent.AddCommand(centosCmd)
|
||||
}
|
||||
|
||||
func archRecipe(parent *cobra.Command) {
|
||||
archCmd := &cobra.Command{
|
||||
Use: "arch",
|
||||
Short: "Boot an Arch Linux installer",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
arch, err := cmd.Flags().GetString("arch")
|
||||
if err != nil {
|
||||
fatalf("Error reading flag: %s", err)
|
||||
}
|
||||
mirror, err := cmd.Flags().GetString("mirror")
|
||||
if err != nil {
|
||||
fatalf("Error reading flag: %s", err)
|
||||
}
|
||||
|
||||
kernel := fmt.Sprintf("%s/iso/latest/arch/boot/%s/vmlinuz", mirror, arch)
|
||||
initrd := fmt.Sprintf("%s/iso/latest/arch/boot/%s/archiso.img", mirror, arch)
|
||||
stage2 := fmt.Sprintf("archisobasedir=arch archiso_http_srv=%s/iso/latest/", mirror)
|
||||
|
||||
fmt.Println(staticFromFlags(cmd, kernel, []string{initrd}, stage2).Serve())
|
||||
},
|
||||
}
|
||||
|
||||
archCmd.Flags().String("arch", "x86_64", "CPU architecture of the Debian installer files")
|
||||
archCmd.Flags().String("mirror", "https://mirrors.kernel.org/archlinux", "Root of the debian mirror to use")
|
||||
serverConfigFlags(archCmd)
|
||||
staticConfigFlags(archCmd)
|
||||
parent.AddCommand(archCmd)
|
||||
}
|
||||
|
||||
func coreosRecipe(parent *cobra.Command) {
|
||||
versions := []string{
|
||||
"stable",
|
||||
@ -336,7 +307,6 @@ func init() {
|
||||
ubuntuRecipe(quickCmd)
|
||||
fedoraRecipe(quickCmd)
|
||||
centosRecipe(quickCmd)
|
||||
//archRecipe(quickCmd)
|
||||
netbootRecipe(quickCmd)
|
||||
coreosRecipe(quickCmd)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user