core: netconf 防止抑制了出错

This commit is contained in:
bin456789 2023-09-03 19:35:02 +08:00
parent c28c5028d1
commit c13c48cee0
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -245,7 +245,7 @@ get_netconf_to() {
slaac) echo "$ra" | grep 'Autonomous address conf' | grep Yes && res=1 || res=0 ;;
dhcpv6) echo "$ra" | grep 'Stateful address conf' | grep Yes && res=1 || res=0 ;;
rdnss) res=$(echo "$ra" | grep 'Recursive DNS server' | cut -d: -f2- | xargs) ;;
*) [ -e /dev/$1 ] && res=$(cat /dev/$1) ;;
*) res=$(cat /dev/$1) ;;
esac
eval "$1='$res'"