From d1ea7ea998293a11ea1cf5df49b26a494645fb65 Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Fri, 27 Jun 2025 06:53:01 -0700 Subject: [PATCH] Fix warnings and improve setup script execution for dnsmasq installation --- bin/wild-dnsmasq-install.sh | 4 ++-- setup/dnsmasq/bin/setup.sh | 2 +- setup/dnsmasq/boot.ipxe | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/wild-dnsmasq-install.sh b/bin/wild-dnsmasq-install.sh index 0528d57..0f43755 100755 --- a/bin/wild-dnsmasq-install.sh +++ b/bin/wild-dnsmasq-install.sh @@ -19,7 +19,7 @@ mkdir -p "${BUNDLE_DIR}" # Create local templates. if [ -d "${DNSMASQ_SETUP_DIR}" ]; then - echo "Warning: ${DNSMASQ_SETUP_DIR}/dnsmasq already exists" + echo "Warning: ${DNSMASQ_SETUP_DIR} already exists" read -p "Overwrite? (y/N): " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then @@ -108,7 +108,7 @@ scp -r ${SETUP_DIR}/* root@${SERVER_HOST}:${DESTINATION_DIR} # Run setup script on the DNSMasq server. echo "Running setup script on ${SERVER_HOST}..." -ssh root@${SERVER_HOST} "bash -s" < "${SETUP_DIR}/setup.sh" || { +ssh root@${SERVER_HOST} "cd ${DESTINATION_DIR} && ./setup.sh" || { echo "Error: Failed to run setup script on ${SERVER_HOST}" exit 1 } \ No newline at end of file diff --git a/setup/dnsmasq/bin/setup.sh b/setup/dnsmasq/bin/setup.sh index e3eb79a..b84e8c4 100755 --- a/setup/dnsmasq/bin/setup.sh +++ b/setup/dnsmasq/bin/setup.sh @@ -10,7 +10,7 @@ sudo apt install -y dnsmasq nginx DNSMASQ_SETUP_DIR="." PXE_FTPD_DIR="${DNSMASQ_SETUP_DIR}/pxe-ftpd" -PXE_WEB_ROOT="${DNSMASQ_SETUP_DIR}/pxe-web" +PXE_WEB_ROOT="${DNSMASQ_SETUP_DIR}/ipxe-web" # Configure nginx. echo "Configuring nginx." diff --git a/setup/dnsmasq/boot.ipxe b/setup/dnsmasq/boot.ipxe index 8958d91..a1f8956 100644 --- a/setup/dnsmasq/boot.ipxe +++ b/setup/dnsmasq/boot.ipxe @@ -1,4 +1,4 @@ -!ipxe +#!ipxe imgfree kernel http://{{ .cloud.dns.ip }}/amd64/vmlinuz talos.platform=metal console=tty0 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512 selinux=1 net.ifnames=0 initrd http://{{ .cloud.dns.ip }}/amd64/initramfs.xz