Commit f6bcd249 authored by Tails developers's avatar Tails developers

Extract greping-the-log -based tor_bootstrap_progress to our shell library.

... so that it is used in the Iceweasel wrapper script.
parent a510bac0
......@@ -173,11 +173,6 @@ tor_cert_valid_after() {
${TOR_LOG} | tail -n 1
}
tor_bootstrap_progress() {
grep -o "\[notice\] Bootstrapped [[:digit:]]\+%:" ${TOR_LOG} | \
tail -n1 | sed "s|\[notice\] Bootstrapped \([[:digit:]]\+\)%:|\1|"
}
tor_cert_lifetime_invalid() {
# To be sure that we only grep relevant information, we
# should delete the log when Tor is started, which we do
......
......@@ -29,6 +29,11 @@ tor_control_setconf() {
tor_control_send "SETCONF ${1}" >/dev/null
}
tor_bootstrap_progress() {
grep -o "\[notice\] Bootstrapped [[:digit:]]\+%:" ${TOR_LOG} | \
tail -n1 | sed "s|\[notice\] Bootstrapped \([[:digit:]]\+\)%:|\1|"
}
# Potential Tor bug: it seems like using this version makes Tor get
# stuck at "Bootstrapped 5%" quite often. Is Tor sensitive to opening
# control ports and/or issuing "getinfo status/bootstrap-phase" during
......
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