Update build.func

This commit is contained in:
Michel Roegl-Brunner 2025-02-03 11:00:34 +01:00
parent 3277749f82
commit a4d4e99505

View File

@ -823,23 +823,23 @@ config_file(){
elif elif
[[ "$NET" =~ $ip_cidr_regex ]]; then [[ "$NET" =~ $ip_cidr_regex ]]; then
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" 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 else
msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}"
exit exit
fi fi
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 if [[ ! -z "$APT_CACHER_IP" ]]; then