From 3524b0b22c1a10affa66e3fbfc433e6b7da3301e Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Mon, 24 May 2021 17:17:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20IP=20=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/AutoBuild_Function.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/AutoBuild_Function.sh b/Scripts/AutoBuild_Function.sh index 845eb5e..34edd18 100755 --- a/Scripts/AutoBuild_Function.sh +++ b/Scripts/AutoBuild_Function.sh @@ -145,8 +145,8 @@ Firmware-Diy_Base() { if [[ ! "${New_IP_Address}" == "${Old_IP_Address}" ]];then TIME "Setting default IP Address to ${New_IP_Address} ..." sed -i "s/${Old_IP_Address}/${New_IP_Address}/g" package/base-files/files/bin/config_generate - a=$(echo ${Old_IP_Address} | egrep -o "[0-9]+.[0-9]+.") - b=$(echo ${New_IP_Address} | egrep -o "[0-9]+.[0-9]+.") + a=$(echo ${Old_IP_Address} | egrep -o "[0-9]+.[0-9]+." | awk 'NR==1') + b=$(echo ${New_IP_Address} | egrep -o "[0-9]+.[0-9]+." | awk 'NR==1') c="$(egrep -o ")).[0-9]+" package/base-files/files/bin/config_generate)" d=")).$(echo ${New_IP_Address} | egrep -o "[0-9]+" | awk 'END {print}')" sed -i "s/${a}/${b}/g" package/base-files/files/bin/config_generate