Commit c195ff18 authored by intrigeri's avatar intrigeri

Introduce a dedicated systemd target for "Tor has bootstrapped" state.

... and move tails-wait-until-tor-has-bootstrapped.service from
default.target to it. The main effect is that anything that wants to
start after graphical.target or multi-user.target does not have to wait
for Tor to have bootstrapped (which could very well never happen, e.g.
when working offline) anymore.

Will-fix: #9393
parent 1390e8b1
......@@ -42,6 +42,7 @@ systemctl enable tails-reconfigure-kexec.service
systemctl enable tails-reconfigure-memlockd.service
systemctl enable tails-sdmem-on-media-removal.service
systemctl enable tails-set-wireless-devices-state.service
systemctl enable tails-tor-has-bootstrapped.target
systemctl enable tails-wait-until-tor-has-bootstrapped.service
systemctl enable tor-controlport-filter.service
......
[Unit]
Description=Tor has bootstrapped
Documentation=https://tails.boum.org/contribute/design/
Requires=graphical.target
Conflicts=rescue.service rescue.target
After=graphical.target rescue.service rescue.target
AllowIsolate=yes
[Install]
WantedBy=graphical.target
......@@ -2,6 +2,7 @@
Description=Wait for Tor to Have Bootstrapped
Documentation=https://tails.boum.org/contribute/design/
After=tor@default.service
Before=tails-tor-has-bootstrapped.target
[Service]
Type=oneshot
......@@ -21,4 +22,4 @@ ProtectHome=yes
ProtectSystem=full
[Install]
WantedBy=multi-user.target
WantedBy=tails-tor-has-bootstrapped.target
#!/bin/sh
/bin/systemctl --quiet is-active tor@default.service || exit 1
[ 'inactive' \
= \
$(/bin/systemctl is-active \
tails-wait-until-tor-has-bootstrapped.service || :) \
]
/bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target
......@@ -992,6 +992,7 @@ browser anyway:
- [[!tails_gitweb config/chroot_local-includes/usr/local/bin/tor-browser]]
- [[!tails_gitweb config/chroot_local-includes/usr/local/bin/generate-tor-browser-profile]]
- [[!tails_gitweb config/chroot_local-includes/lib/systemd/system/tails-tor-has-bootstrapped.target]]
- [[!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/usr/local/sbin/tor-has-bootstrapped]]
......
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