mirror of
https://github.com/samdbmg/dhcp-netboot.xyz.git
synced 2026-01-23 02:25:09 +00:00
Fixes a bug where menus would always be loaded remotely, so local config didn't apply. Also simplifies the config a bit.
12 lines
463 B
Text
Executable file
12 lines
463 B
Text
Executable file
#!/usr/bin/with-contenv bash
|
|
|
|
if [ -z ${CONTAINER_IP} ]; then
|
|
# If an IP wasn't given, assume the default route is the one to go for and get IP from that
|
|
CONTAINER_IP=$(ip route get to 1.1.1.1 | awk '/1.1.1.1/ { print $7}')
|
|
fi
|
|
|
|
# Start dnsmasq
|
|
dnsmasq --no-daemon --dhcp-range=${DHCP_RANGE_START},proxy \
|
|
--dhcp-boot=tag:ipxe-bios,netboot.xyz.kpxe,,${CONTAINER_IP} \
|
|
--dhcp-boot=tag:ipxe-efi,netboot.xyz.efi,,${CONTAINER_IP} \
|
|
${DNSMASQ_ARGS}
|