forked from finn/tinyboard
Compare commits
2 Commits
96c737709c
...
fe7f77171f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe7f77171f | ||
|
|
288aa698d0 |
7
setup-network.sh
Normal file → Executable file
7
setup-network.sh
Normal file → Executable file
@@ -73,7 +73,7 @@ echo ""
|
|||||||
|
|
||||||
NETPLAN_FILE=$(ls /etc/netplan/*.yaml 2>/dev/null | head -1)
|
NETPLAN_FILE=$(ls /etc/netplan/*.yaml 2>/dev/null | head -1)
|
||||||
read -rp "Netplan file to update [${NETPLAN_FILE}]: " INPUT_FILE
|
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)}"
|
NETPLAN_FILE="${NETPLAN_FILE:-$(ls /etc/netplan/*.yaml 2>/dev/null | head -1)}"
|
||||||
[ -n "$NETPLAN_FILE" ] || die "No netplan file specified"
|
[ -n "$NETPLAN_FILE" ] || die "No netplan file specified"
|
||||||
|
|
||||||
@@ -141,7 +141,8 @@ network:
|
|||||||
via: ${GATEWAY}
|
via: ${GATEWAY}
|
||||||
nameservers:
|
nameservers:
|
||||||
addresses:
|
addresses:
|
||||||
$(printf '%b' "$DNS_YAML")NETEOF
|
$(printf '%b' "$DNS_YAML")
|
||||||
|
NETEOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Netplan config written to $NETPLAN_FILE"
|
info "Netplan config written to $NETPLAN_FILE"
|
||||||
@@ -161,6 +162,6 @@ echo -e "${YELLOW}════════════════════
|
|||||||
echo -e "${YELLOW} Network reconfigured.${NC}"
|
echo -e "${YELLOW} Network reconfigured.${NC}"
|
||||||
echo -e "${YELLOW} If you are connected via SSH, your session${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} 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 -e "${YELLOW}══════════════════════════════════════════${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user