psychomario/PyPXE — pull request #16 by mmattioli (2014-07-10 18:50:27+00:00)
Title: Disable iPXE, HTTP, and DHCP by Default, Minor Reliability Improvements, Minor Bug Fix

Disable iPXE, HTTP, and DHCP by Default
---
PXE in its simplest form is just TFTP + DHCP. In most cases, DHCP is already present and one just needs a PXE-bootable server in order to serve network-bootable files so the existing DHCP server will be configured to point to the machine running PyPXE and the built-in TFTP server will do the rest (full command: ```sudo python server.py```). In cases where a DHCP server is needed, a simple ```--dhcp``` can be used to enable the DHCP server so the full command would be ```sudo python server.py --dhcp```.

The reason for this change is the majority use-case which is simple PXE-bootability (TFTP + DHCP). The majority use case will not use HTTP or iPXE but while those are awesome features, it's much easier to run ```sudo python server.py --dhcp --http``` or ```sudo python server.py --dhcp --http --ipxe``` or, if a DHCP server is already present, ```sudo server.py --http --ipxe```.

By only enabling TFTP by default, users get an out-of-the-box PXE boot environment with minimal configuration: ```sudo python server.py```

The current method of disabling them and leaving them enabled by default makes it bothersome to use because the long arguments ```--no-dhcp --no-http --no-ipxe``` are much more annoying to use than the shorter ones that enable them.

Minor Readability Improvements
---
Fixed a few line breaks and whatnot that can make functions difficult to read

Minor Bug Fix
---

Removed the ```/``` from the NETBOOT_FILE parameter since it just recursively adds another every time a file is served.