diff --git a/bin/libbfa.sh b/bin/libbfa.sh index c6ed763f978769e9a1254529a99766a2492a726a..b5d1de5e280edd9a1a13723ec1d75690e7befae3 100644 --- a/bin/libbfa.sh +++ b/bin/libbfa.sh @@ -188,14 +188,17 @@ function nodedir test -r "${BFANODEDIR}/rpcport" || echo $(( $RANDOM / 2 + 12345 )) > ${BFANODEDIR}/rpcport rpcport=$( cat ${BFANODEDIR}/rpcport ) +} + +function extradata +{ + account # something uniqueish ## find default interface local def_if=$( ( ip -4 route show ; ip -6 route show ) | expand | sed -ne '/^default /{s/ */ /g;s/^.* dev //;s/ .*//;p;q}' ) local mymac=$( ip link show ${def_if} | sed -ne '/link\|ether/{s/^.*link.ether //;s/ .*//;s/://g;p;q}' ) - - BFAEXTRADATA="${USER}@${HOSTNAME}" - BFAEXTRADATA="${BFAEXTRADATA} " - BFAEXTRADATA="${BFAEXTRADATA:0:19} ${mymac}" + # + echo -n "${account:0:19} ${mymac:0:12}" } function account diff --git a/bin/start.sh b/bin/start.sh index 21d51e6f39fd2eeb4285cc1a4b5c88b175ae8b30..b49303d9245acb5c0c6e99ba04ccdcf9b66fa609 100755 --- a/bin/start.sh +++ b/bin/start.sh @@ -61,7 +61,7 @@ function getsyncmode echo '***' echo # (re)configure parameters (you never know if they changed) - flexargs="$( accountlist) $( getminer ) $( getsyncmode )" + flexargs="$( accountlist) $( getminer ) $( getsyncmode ) --extradata $( extradata )" \ set -x geth \ --datadir ${BFANODEDIR} \ @@ -78,7 +78,6 @@ function getsyncmode --txpool.globalslots 32768 \ --txpool.accountqueue 512 \ --txpool.globalqueue 8192 \ - --extradata "${BFAEXTRADATA}" \ --gcmode archive \ --cache 512 \ --verbosity 3 &