Skip to content

Commit c7c9e76

Browse files
authored
Merge pull request unraid#2546 from SimonFair/fix(IP)-parsing-ip-addr-with-peer-information
fix(IP) parsing ip addr with peer information
2 parents f4fc0b1 + 1bc4c07 commit c7c9e76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

etc/rc.d/rc.library.source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ good(){
5757
show(){
5858
case $# in
5959
1) ip -br addr show scope global primary -deprecated to $1 2>/dev/null | awk '{gsub("@.+","",$1);print $1;exit}' ;;
60-
2) ip -br addr show scope global primary -deprecated $1 $2 2>/dev/null | awk '{$1=$2="";print;exit}' | sed -r 's/ metric [0-9]+//g' ;;
60+
2) ip -br addr show scope global primary -deprecated $1 $2 2>/dev/null | awk '{$1=$2="";print;exit}' | sed -r 's/ metric [0-9]+//g;s/ peer [0-9a-fA-F:.]+\/[0-9]+//g;s/^ +//g' ;;
6161
esac
6262
}
6363

0 commit comments

Comments
 (0)