You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: func/main.sh
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1025,12 +1025,7 @@ is_int_format_valid() {
1025
1025
1026
1026
# Interface validator
1027
1027
is_interface_format_valid() {
1028
-
# Detect "physical" NICs only (virtual NICs created by Docker, WireGuard etc. are excluded)
1029
-
nic_names="$(ip -d -j link show | jq -r '.[] | if .link_type == "loopback" // .linkinfo.info_kind then empty else .ifname, if .altnames then .altnames[] else empty end end')"
1030
-
# Proxmox return empty value for $physical_nics
1031
-
if [ -z"$nic_names" ];then
1032
-
nic_names="$(ip -d -j link show | jq -r '.[] | if .link_type == "loopback" then empty else .ifname, if .altnames then .altnames[] else empty end end')"
1033
-
fi
1028
+
nic_names="$(ip -d -j link show | jq -r '.[] | if .link_type == "loopback" then empty else .ifname, if .altnames then .altnames[] else empty end end')"
1034
1029
if [ -z"$(echo "$nic_names"| grep -x "$1")" ];then
1035
1030
check_result "$E_INVALID""invalid interface format :: $1"
0 commit comments