Update chr_busybox.sh

Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
elseif 2025-08-23 04:19:30 +08:00 committed by GitHub
parent 7c22877423
commit 2162e76e64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ STORAGE=$(for d in /sys/block/*; do
done) done)
echo "STORAGE is $STORAGE" echo "STORAGE is $STORAGE"
ETH=$(ip route show default | sed -n 's/.* dev \([^\ ]*\) .*/\1/p') ETH=$(ip route show default | grep '^default' | sed -n 's/.* dev \([^\ ]*\) .*/\1/p')
echo "ETH is $ETH" echo "ETH is $ETH"
ADDRESS=$(ip addr show $ETH | grep global | cut -d' ' -f 6 | head -n 1) ADDRESS=$(ip addr show $ETH | grep global | cut -d' ' -f 6 | head -n 1)