1
0
forked from finn/tinyboard

Compare commits

...

2 Commits

Author SHA1 Message Date
Justin Oros
fe7f77171f fix wired DNS heredoc trailing newline 2026-04-16 09:59:23 -07:00
Justin Oros
288aa698d0 fix netplan file fallback assignment bug in setup-network.sh 2026-04-16 09:57:29 -07:00
2 changed files with 4 additions and 3 deletions

7
setup-network.sh Normal file → Executable file
View File

@@ -73,7 +73,7 @@ echo ""
NETPLAN_FILE=$(ls /etc/netplan/*.yaml 2>/dev/null | head -1)
read -rp "Netplan file to update [${NETPLAN_FILE}]: " INPUT_FILE
NETPLAN_FILE="${INPUT_FILE:-$INPUT_FILE}"
NETPLAN_FILE="${INPUT_FILE:-$NETPLAN_FILE}"
NETPLAN_FILE="${NETPLAN_FILE:-$(ls /etc/netplan/*.yaml 2>/dev/null | head -1)}"
[ -n "$NETPLAN_FILE" ] || die "No netplan file specified"
@@ -141,7 +141,8 @@ network:
via: ${GATEWAY}
nameservers:
addresses:
$(printf '%b' "$DNS_YAML")NETEOF
$(printf '%b' "$DNS_YAML")
NETEOF
fi
info "Netplan config written to $NETPLAN_FILE"
@@ -161,6 +162,6 @@ echo -e "${YELLOW}════════════════════
echo -e "${YELLOW} Network reconfigured.${NC}"
echo -e "${YELLOW} If you are connected via SSH, your session${NC}"
echo -e "${YELLOW} may drop. Reconnect to: ${STATIC_ADDR}${NC}"
echo -e "${YELLOW} Then run: sudo ./setup-spoke.sh${NC}"
echo -e "${YELLOW} Then run: ./setup.sh${NC}"
echo -e "${YELLOW}══════════════════════════════════════════${NC}"
echo ""

0
setup.sh Normal file → Executable file
View File