diff --git a/emhttp/plugins/dynamix/scripts/error_interfaces b/emhttp/plugins/dynamix/scripts/error_interfaces index 444a4c1d0..9373fc1a7 100755 --- a/emhttp/plugins/dynamix/scripts/error_interfaces +++ b/emhttp/plugins/dynamix/scripts/error_interfaces @@ -2,14 +2,12 @@ nets=() while IFS='\n' read -r net; do net=${net%/*} - net4=$(ip -br -4 addr show to $net 2>/dev/null|awk '$1 !~ "^shim" {print $1}'|tr '\n' ','|sed 's/,$//') + net4=$(ip -br -4 addr show scope global to $net 2>/dev/null | awk '$1 !~ "^shim" {print $1}'|tr '\n' ',' | sed 's/,$//') [[ -n $net4 ]] && nets+=("$net4 = $net;") -done <<< $(ip -br -4 addr|awk '/^(br|bond|eth|wg)[0-9]+(\.[0-9]+)?/ {print $3}'|uniq -d) +done <<< $(ip -br -4 addr show scope global | awk '/^(br|bond|eth|wlan|wg)[0-9]+(\.[0-9]+)?/ {print $3}' | uniq -d) while IFS=$'\n' read -r net; do net=${net%/*} - net6=$(ip -br -6 addr show to $net 2>/dev/null|awk '$1 !~ "^shim" {print $1}'|tr '\n' ','|sed 's/,$//') + net6=$(ip -br -6 addr show scope global -temporary -deprecated to $net 2>/dev/null | awk '$1 !~ "^shim" {print $1}'|tr '\n' ',' | sed 's/,$//') [[ -n $net6 ]] && nets+=("$net6 = $net;") -done <<< $(ip -br -6 addr|awk '/^(br|bond|eth|wg)[0-9]+(\.[0-9]+)?/ && $3 !~ "^fe80" {print $3}'|uniq -d) - -[[ -n $nets ]] && echo "${nets[@]}"|sed 's/;$//' +done <<< $(ip -br -6 addr show scope global -temporary -deprecated | awk '/^(br|bond|eth|wlan|wg)[0-9]+(\.[0-9]+)?/ {print $3}' | uniq -d) diff --git a/etc/rc.d/rc.library.source b/etc/rc.d/rc.library.source index 437253528..9b6f309a1 100644 --- a/etc/rc.d/rc.library.source +++ b/etc/rc.d/rc.library.source @@ -55,8 +55,8 @@ good(){ show(){ case $# in - 1) ip -br addr show scope global to $1 2>/dev/null | awk '{gsub("@.+","",$1);print $1;exit}' ;; - 2) ip -br addr show scope global $1 $2 2>/dev/null | awk '{$1=$2="";print;exit}' | sed -r 's/ metric [0-9]+//g' ;; + 1) ip -br addr show scope global -temporary -deprecated to $1 2>/dev/null | awk '{gsub("@.+","",$1);print $1;exit}' ;; + 2) ip -br addr show scope global -temporary -deprecated $1 $2 2>/dev/null | awk '{$1=$2="";print;exit}' | sed -r 's/ metric [0-9]+//g' ;; esac }