Browse Source

Fix net shaper script to properly query interfaces (#17065)

Previously was using ifconfig which is not available on gce
Ashwin Sekar 4 năm trước cách đây
mục cha
commit
12c2cd4e86
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      scripts/net-shaper.sh

+ 1 - 1
scripts/net-shaper.sh

@@ -15,7 +15,7 @@ fi
 
 set -x
 
-iface="$(ifconfig | grep mtu | grep -iv loopback | grep -i running | awk 'BEGIN { FS = ":" } ; {print $1}')"
+iface="$(ip link show | grep mtu | grep -iv loopback | grep "state UP" | awk 'BEGIN { FS = ": " } ; {print $2}')"
 
 if [[ "$1" = cleanup ]]; then
   $sudo ~solana/.cargo/bin/solana-net-shaper cleanup -f "$2" -s "$3" -p "$4" -i "$iface"