Update build.func

This commit is contained in:
CanbiZ 2025-03-21 09:26:50 +01:00
parent 4761ead586
commit 50afd96523

View File

@ -1081,7 +1081,6 @@ config_file(){
exit
fi
local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$'
local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$'
@ -1090,7 +1089,8 @@ config_file(){
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}"
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}"
elif
[[ "$NET" =~ $ip_cidr_regex ]]; then
[[ "$NET" =~ $ip_cidr_regex ]]
then
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
else
msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}"
@ -1110,7 +1110,6 @@ config_file(){
exit
fi
if [[ ! -z "$APT_CACHER_IP" ]]; then
if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then
APT_CACHER="yes"
@ -1152,7 +1151,6 @@ config_file(){
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}"
fi
if [[ ! -z "$NS" ]]; then
if [[ "$NS" =~ $ip_regex ]]; then
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}"