Skip to content
Snippets Groups Projects
Commit ef91ac5a authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

extradata 'must' be a single string, the way we're storing it in a string before using it

parent b3326343
No related branches found
No related tags found
No related merge requests found
......@@ -46,9 +46,9 @@ function geth_attach
function geth_exec_js
{
test -r "$1"
if echo $- | grep -q x
if echo $- | grep -q x && [ -t 1 ]
then
sed "s//input: /" "$1"
sed "s/^/input: /" "$1"
fi
geth_attach --exec "loadScript(\"$1\")" </dev/null
}
......@@ -198,7 +198,7 @@ function extradata
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}' )
#
echo -n "${account:0:19} ${mymac:0:12}"
echo -n "${account:0:19}.${mymac:0:12}"
}
function account
......
......@@ -41,9 +41,9 @@ function getminer
function getsyncmode
{
local syncmode=$( cat "${BFANODEDIR}/syncmode" 2>/dev/null )
local syncmode=$( cat "${BFANODEDIR}/syncmode" 2>/dev/null || true )
syncmode=${syncmode:-fast}
echo -- "--syncmode ${syncmode}"
echo "--syncmode ${syncmode}"
}
......@@ -61,11 +61,10 @@ function getsyncmode
echo '***'
echo
# (re)configure parameters (you never know if they changed)
flexargs="$( accountlist) $( getminer ) $( getsyncmode ) --extradata $( extradata )" \
flexargs="$( accountlist) $( getminer ) $( getsyncmode ) --extradata $( extradata )"
set -x
geth \
--datadir ${BFANODEDIR} \
${flexargs} \
--networkid $BFANETWORKID \
--bootnodes "${bootnodes}" \
--rpc \
......@@ -80,7 +79,8 @@ function getsyncmode
--txpool.globalqueue 8192 \
--gcmode archive \
--cache 512 \
--verbosity 3 &
--verbosity 3 \
${flexargs} &
set +x
echo $! > ${BFANODEDIR}/geth.pid
wait
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment