(cmd *cobra.Command)
| 70 | } |
| 71 | |
| 72 | func serverConfigFlags(cmd *cobra.Command) { |
| 73 | cmd.Flags().BoolP("debug", "d", false, "Log more things that aren't directly related to booting a recognized client") |
| 74 | cmd.Flags().BoolP("log-timestamps", "t", false, "Add a timestamp to each log line") |
| 75 | cmd.Flags().StringP("listen-addr", "l", "0.0.0.0", "IPv4 address to listen on") |
| 76 | cmd.Flags().IntP("port", "p", 80, "Port to listen on for HTTP") |
| 77 | cmd.Flags().Int("status-port", 0, "HTTP port for status information (can be the same as --port)") |
| 78 | cmd.Flags().Bool("dhcp-no-bind", false, "Handle DHCP traffic without binding to the DHCP server port") |
| 79 | cmd.Flags().String("ipxe-bios", "", "Path to an iPXE binary for BIOS/UNDI") |
| 80 | cmd.Flags().String("ipxe-ipxe", "", "Path to an iPXE binary for chainloading from another iPXE") |
| 81 | cmd.Flags().String("ipxe-efi32", "", "Path to an iPXE binary for 32-bit UEFI") |
| 82 | cmd.Flags().String("ipxe-efi64", "", "Path to an iPXE binary for 64-bit UEFI") |
| 83 | |
| 84 | // Development flags, hidden from normal use. |
| 85 | cmd.Flags().String("ui-assets-dir", "", "UI assets directory (used for development)") |
| 86 | cmd.Flags().MarkHidden("ui-assets-dir") |
| 87 | } |
| 88 | |
| 89 | func mustFile(path string) []byte { |
| 90 | bs, err := ioutil.ReadFile(path) |
no test coverage detected