From 7d1e1443b358a1d5f5ef1217b5c2a59f5be59dd3 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Fri, 10 Nov 2023 19:06:26 +0900 Subject: [PATCH] Update InstallNET.sh --- Linux_reinstall/InstallNET.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linux_reinstall/InstallNET.sh b/Linux_reinstall/InstallNET.sh index 19c87eb..fe8c3a1 100644 --- a/Linux_reinstall/InstallNET.sh +++ b/Linux_reinstall/InstallNET.sh @@ -2415,7 +2415,7 @@ function getInterface() { # There are 3 files named "ifcfg-ens18 ifcfg-eth0 ifcfg-eth1" in dir "/etc/sysconfig/network-scripts/" of Almalinux 8 of Bandwagonhosts template. # We should select the correct one by adjust whether includes interface name and file size. # Files in "/etc/sysconfig/network-scripts/", reference: https://zetawiki.com/wiki/%EB%B6%84%EB%A5%98:/etc/sysconfig/network-scripts - NetCfgFiles=$(ls -Sl $NetCfgDir 2>/dev/null | awk -F' ' '{print $NF}' | grep -iv 'readme\|ifcfg-lo\|ifcfg-bond\|ifup\|ifdown\|vpn\|init.ipv6-global\|network-functions' | grep -s "ifcfg\|nmconnection") + NetCfgFiles=$(ls -Sl $NetCfgDir 2>/dev/null | awk -F' ' '{print $NF}' | grep -iv 'readme-\|ifcfg-lo\|ifcfg-bond\|ifup\|ifdown\|vpn\|init.ipv6-global\|network-functions\|lo.' | grep -s "ifcfg\|nmconnection") for Files in $NetCfgFiles; do if [[ $(grep -w "$interface4\|$interface6" "$NetCfgDir$Files") != "" ]]; then tmpNetCfgFiles+=$(echo -e "\n""$NetCfgDir$Files")