Update build.func
This commit is contained in:
parent
4761ead586
commit
50afd96523
@ -1081,7 +1081,6 @@ config_file(){
|
|||||||
exit
|
exit
|
||||||
fi
|
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_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})$'
|
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 "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}"
|
||||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}"
|
||||||
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}"
|
||||||
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}"
|
||||||
@ -1110,7 +1110,6 @@ config_file(){
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -z "$APT_CACHER_IP" ]]; then
|
if [[ ! -z "$APT_CACHER_IP" ]]; then
|
||||||
if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then
|
if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then
|
||||||
APT_CACHER="yes"
|
APT_CACHER="yes"
|
||||||
@ -1152,7 +1151,6 @@ config_file(){
|
|||||||
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -z "$NS" ]]; then
|
if [[ ! -z "$NS" ]]; then
|
||||||
if [[ "$NS" =~ $ip_regex ]]; then
|
if [[ "$NS" =~ $ip_regex ]]; then
|
||||||
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user