dhcp-netboot.xyz/etc/services.d/dnsmasq/run
Sam Mesterton-Gibbons 4eef355c91 Change dnsmasq config to set next_server properly
Fixes a bug where menus would always be loaded remotely, so local config
didn't apply. Also simplifies the config a bit.
2022-07-23 22:55:16 +01:00

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}