Commit 8e889f91 authored by Tails developers's avatar Tails developers

Have tor_bootstrap_progress echo 0 if no matching log line is found (Closes: #8257).

parent 4e3d193a
......@@ -34,8 +34,12 @@ tor_control_setconf() {
}
tor_bootstrap_progress() {
grep -o "\[notice\] Bootstrapped [[:digit:]]\+%:" ${TOR_LOG} | \
tail -n1 | sed "s|\[notice\] Bootstrapped \([[:digit:]]\+\)%:|\1|"
RES=$(grep -o "\[notice\] Bootstrapped [[:digit:]]\+%:" ${TOR_LOG} | \
tail -n1 | sed "s|\[notice\] Bootstrapped \([[:digit:]]\+\)%:|\1|")
if [ -z "$RES" ] ; then
RES=0
fi
echo -n "$RES"
}
# Potential Tor bug: it seems like using this version makes Tor get
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment