Ver código fonte

Update build.func

shfmt
tteckster 2 anos atrás
pai
commit
325071c2f1
1 arquivos alterados com 17 adições e 17 exclusões
  1. 17 17
      misc/build.func

+ 17 - 17
misc/build.func

@@ -268,23 +268,23 @@ advanced_settings() {
     fi
     fi
   done
   done
 
 
-if [ "$NET" != "dhcp" ]; then
-  while true; do
-    GATE1=$(whiptail --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3)
-    if [ -z "$GATE1" ]; then
-      whiptail --msgbox "Gateway IP address cannot be empty" 8 58
-    elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
-      whiptail --msgbox "Invalid IP address format" 8 58
-    else
-      GATE=",gw=$GATE1"
-      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
-      break
-    fi
-  done
-else
-  GATE=""
-  echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}"
-fi
+  if [ "$NET" != "dhcp" ]; then
+    while true; do
+      GATE1=$(whiptail --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3)
+      if [ -z "$GATE1" ]; then
+        whiptail --msgbox "Gateway IP address cannot be empty" 8 58
+      elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
+        whiptail --msgbox "Invalid IP address format" 8 58
+      else
+        GATE=",gw=$GATE1"
+        echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
+        break
+      fi
+    done
+  else
+    GATE=""
+    echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}"
+  fi
 
 
   if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
   if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
     DISABLEIP6="yes"
     DISABLEIP6="yes"