From 3110074161c2859c8e9508a117363d616d90362c Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 14 Apr 2019 18:56:01 +0100 Subject: [PATCH 1/2] fix ifconfig eth0: error in Armbian --- home.admin/00infoBlitz.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index 1403456..2d89171 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -75,8 +75,15 @@ else fi # get network traffic -network_rx=$(ifconfig eth0 | grep 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') -network_tx=$(ifconfig eth0 | grep 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') +# ifconfig does not show eth0 on Armbian - get first traffic info +isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian') +if [ ${isArmbian} -gt 0 ]; then + network_rx=$(ifconfig | grep -m1 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') + network_tx=$(ifconfig | grep -m1 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') +else + network_rx=$(ifconfig eth0 | grep 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') + network_tx=$(ifconfig eth0 | grep 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g') +fi # Bitcoin blockchain btc_path=$(command -v ${network}-cli) From 652292bcf64c12407175f33946f4e5fdac59726d Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 14 Apr 2019 21:41:05 +0100 Subject: [PATCH 2/2] fix bitcoinOSversion --- build_sdcard.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index fcff651..9aeb4df 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -347,13 +347,13 @@ bitcoinVersion="0.17.1" # set OS version if [ ${isARM} -eq 1 ] ; then - bitcoinOSversion="arm" + bitcoinOSversion="arm-linux-gnueabihf" # needed to make sure download is not changed # calulate with sha256sum and also check with SHA256SUMS.asc bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc" fi if [ ${isAARCH64} -eq 1 ] ; then - bitcoinOSversion="aarch64" + bitcoinOSversion="aarch64-linux-gnu" bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34" fi @@ -366,7 +366,7 @@ sudo -u admin mkdir /home/admin/download cd /home/admin/download # download resources -binaryName="bitcoin-${bitcoinVersion}-${bitcoinOSversion}-linux-gnueabihf.tar.gz" +binaryName="bitcoin-${bitcoinVersion}-${bitcoinOSversion}.tar.gz" sudo -u admin wget https://bitcoin.org/bin/bitcoin-core-${bitcoinVersion}/${binaryName} if [ ! -f "./${binaryName}" ] then