Update InstallNET.sh

This commit is contained in:
Molly Lau 2022-12-07 23:56:52 +09:00 committed by GitHub
parent 1a4f9ec4b7
commit d16e01b4b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -934,7 +934,7 @@ if [[ "$setNet" == "0" ]]; then
[[ ! "$IPStackType" == "IPv4Stack" ]] && {
i6Addr=`ip -6 addr show | grep -wv "lo\|host" | grep -wv "link" | grep -w "inet6" | grep "scope" | grep "global" | head -n 1 | awk -F " " '{for (i=2;i<=NF;i++)printf("%s ", $i);print ""}' | awk '{print$1}'`
ip6Addr=`echo ${i6Addr} |cut -d'/' -f1`
ip6Mask=`echo ${i6Addr} |cut -d'/' -f2`
ip6Mask=`echo ${i6Addr} |cut -d'/' -f2`
ip6Gate=`ip -6 route show default | grep -w "via" | grep -w "$interface" | grep "dev" | head -n 1 | awk -F " " '{for (i=3;i<=NF;i++)printf("%s ", $i);print ""}' | awk '{print$1}'`
}
fi