From a4d4e99505d43c25fb31d3a4ebeb5576204f80f4 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Mon, 3 Feb 2025 11:00:34 +0100 Subject: [PATCH] Update build.func --- misc/build.func | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/misc/build.func b/misc/build.func index dc8accfc..01951349 100644 --- a/misc/build.func +++ b/misc/build.func @@ -823,23 +823,23 @@ config_file(){ elif [[ "$NET" =~ $ip_cidr_regex ]]; then echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - if [ ! -z "$GATE" ]; then - if [[ "$GATE" =~ $ip_regex ]]; then - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" - GATE=",gw=$GATE" - else - msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" - exit - fi - else - msg_error "Gateway IP Address cannot be empty" - exit - fi else msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" exit fi fi + if [ ! -z "$GATE" ]; then + if [[ "$GATE" =~ $ip_regex ]]; then + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" + GATE=",gw=$GATE" + else + msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" + exit + fi + else + msg_error "Gateway IP Address cannot be empty" + exit + fi if [[ ! -z "$APT_CACHER_IP" ]]; then