Commit 7f7757cd authored by segfault's avatar segfault

Remove tor-has-bootstrapped script (refs: #16664)

Replace all calls to config/chroot_local-includes/usr/local/sbin/tor-has-bootstrapped
with `/bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target`.
parent d9ae8bf8
......@@ -19,7 +19,7 @@ export LANG
TEXTDOMAIN="tails"
export TEXTDOMAIN
while ! /usr/local/sbin/tor-has-bootstrapped; do
while ! /bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target; do
sleep 1
done
......
......@@ -22,7 +22,7 @@ lang_code = os.getenv('LANG', 'en')[0:2]
# If possible, let's hand-off to our website, which should be the most
# up-to-date option.
if os.system('/usr/local/sbin/tor-has-bootstrapped') == 0:
if os.system('/bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target') == 0:
if os.path.isfile(os.path.join(
wiki_path, page + '.' + lang_code + ".html")):
uri = tails_homepage + '/' + page + '/index.' + lang_code + '.html'
......
......@@ -68,7 +68,7 @@ start_browser() {
}
if /usr/local/sbin/tor-has-bootstrapped || ask_for_confirmation; then
if /bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target || ask_for_confirmation; then
# Torbutton 1.5.1+ uses those environment variables
export TOR_SOCKS_HOST='127.0.0.1'
export TOR_SOCKS_PORT='9150'
......
#!/bin/sh
/bin/systemctl --quiet is-active tor@default.service || exit 1
/bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target
......@@ -161,7 +161,7 @@ class TorBootstrapFailure < StandardError
end
def wait_until_tor_is_working
try_for(270) { $vm.execute('/usr/local/sbin/tor-has-bootstrapped').success? }
try_for(270) { $vm.execute('/bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target').success? }
rescue Timeout::Error
# Save Tor logs before erroring out
File.open("#{$config["TMPDIR"]}/log.tor", 'w') { |file|
......
......@@ -1057,7 +1057,6 @@ browser anyway:
- [[!tails_gitweb config/chroot_local-includes/lib/systemd/system/tails-wait-until-tor-has-bootstrapped.service]]
- [[!tails_gitweb config/chroot_local-includes/usr/lib/systemd/user/tails-wait-until-tor-has-bootstrapped.service]]
- [[!tails_gitweb config/chroot_local-includes/lib/systemd/system/tails-tor-has-bootstrapped-flag-file.service]]
- [[!tails_gitweb config/chroot_local-includes/usr/local/sbin/tor-has-bootstrapped]]
Once Tor is ready to be used, the user is informed they can now use
the Internet:
......
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