summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2017-03-03 08:54:54 +0000
committerintrigeri <intrigeri@boum.org>2017-03-03 08:54:54 +0000
commit647fdf3914247d5311e7ccd21b6f2043b463d458 (patch)
treece4457e6ba06ccd4ea780999485cdb4db7763765 /config
parentf191233b871349ead192832c44b297a9c64e56f2 (diff)
parentd21e11aece4ec320c2ea6a5cdcd7a43f868ee2c6 (diff)
Merge branch 'stable' into feature/12193-notify-if-32-bit
Diffstat (limited to 'config')
-rwxr-xr-xconfig/chroot_local-hooks/52-update-rc.d1
-rw-r--r--config/chroot_local-includes/usr/lib/systemd/user/tails-i2p-removal-notify-user.service11
-rwxr-xr-xconfig/chroot_local-includes/usr/local/bin/tails-documentation5
-rwxr-xr-xconfig/chroot_local-includes/usr/local/bin/tor-browser7
-rwxr-xr-xconfig/chroot_local-includes/usr/local/lib/tails-i2p-removal-notify-user60
5 files changed, 82 insertions, 2 deletions
diff --git a/config/chroot_local-hooks/52-update-rc.d b/config/chroot_local-hooks/52-update-rc.d
index de38433..48cfbbb 100755
--- a/config/chroot_local-hooks/52-update-rc.d
+++ b/config/chroot_local-hooks/52-update-rc.d
@@ -52,6 +52,7 @@ systemctl --global enable tails-32-bit-notify-user.service
systemctl --global enable tails-add-GNOME-bookmarks.service
systemctl --global enable tails-configure-keyboard.service
systemctl --global enable tails-create-tor-browser-directories.service
+systemctl --global enable tails-i2p-removal-notify-user.service
systemctl --global enable tails-security-check.service
systemctl --global enable tails-upgrade-frontend.service
systemctl --global enable tails-virt-notify-user.service
diff --git a/config/chroot_local-includes/usr/lib/systemd/user/tails-i2p-removal-notify-user.service b/config/chroot_local-includes/usr/lib/systemd/user/tails-i2p-removal-notify-user.service
new file mode 100644
index 0000000..b630960
--- /dev/null
+++ b/config/chroot_local-includes/usr/lib/systemd/user/tails-i2p-removal-notify-user.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Warn the user that I2P will be removed
+ConditionKernelCommandLine=i2p
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/lib/tails-i2p-removal-notify-user
+RemainAfterExit=yes
+
+[Install]
+WantedBy=desktop.target
diff --git a/config/chroot_local-includes/usr/local/bin/tails-documentation b/config/chroot_local-includes/usr/local/bin/tails-documentation
index 36932d0..6a99cb6 100755
--- a/config/chroot_local-includes/usr/local/bin/tails-documentation
+++ b/config/chroot_local-includes/usr/local/bin/tails-documentation
@@ -17,4 +17,9 @@ else
FILE="${PAGE}.html"
fi
+if [ -n "${2}" ]; then
+ FILE="${FILE}#${2}"
+fi
+
+export TOR_BROWSER_SKIP_OFFLINE_WARNING=yes
exec /usr/local/bin/tor-browser "file://${WIKI_ROOT}/${FILE}"
diff --git a/config/chroot_local-includes/usr/local/bin/tor-browser b/config/chroot_local-includes/usr/local/bin/tor-browser
index 8024d33..a2d0902 100755
--- a/config/chroot_local-includes/usr/local/bin/tor-browser
+++ b/config/chroot_local-includes/usr/local/bin/tor-browser
@@ -19,6 +19,9 @@ PROFILE="${HOME}/.tor-browser/profile.default"
# Import exec_firefox() and configure_best_tor_browser_locale()
. /usr/local/lib/tails-shell-library/tor-browser.sh
+# Get LIVE_USERNAME
+. /etc/live/config.d/username.conf
+
# Allow Torbutton access to the control port filter (for new identity).
# Setting a password is required, otherwise Torbutton attempts to
# read the authentication cookie file instead, which fails.
@@ -32,8 +35,8 @@ export TOR_NO_DISPLAY_NETWORK_SETTINGS='yes'
ask_for_confirmation() {
- # Skip dialog if user is already running Tor Browser:
- if pgrep -u amnesia -f "${TBB_INSTALL}/firefox" ; then
+ if [ "${TOR_BROWSER_SKIP_OFFLINE_WARNING:-}" = 'yes' ] || \
+ pgrep -u "${LIVE_USERNAME}" -f "${TBB_INSTALL}/firefox"; then
return
fi
diff --git a/config/chroot_local-includes/usr/local/lib/tails-i2p-removal-notify-user b/config/chroot_local-includes/usr/local/lib/tails-i2p-removal-notify-user
new file mode 100755
index 0000000..94d479f
--- /dev/null
+++ b/config/chroot_local-includes/usr/local/lib/tails-i2p-removal-notify-user
@@ -0,0 +1,60 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+#man{{{
+
+=head1 NAME
+
+tails-i2p-removal-notify-user
+
+=head1 VERSION
+
+Version X.XX
+
+=head1 AUTHOR
+
+Tails dev team <amnesia@boum.org>
+See https://tails.boum.org/.
+
+=cut
+
+#}}}
+
+use Desktop::Notify;
+use Locale::gettext;
+use Net::DBus::Reactor;
+use POSIX;
+
+### initialization
+setlocale(LC_MESSAGES, "");
+textdomain("tails");
+
+### callbacks
+
+sub action_cb {
+ my $reactor = shift;
+ exec(
+ '/usr/local/bin/tails-documentation',
+ 'doc/anonymous_internet/i2p',
+ 'removal',
+ );
+ $reactor->shutdown;
+}
+
+### main
+
+my $reactor = Net::DBus::Reactor->main;
+
+my $notify = Desktop::Notify->new();
+$notify->action_callback(sub { action_cb($reactor, @_) });
+$notify->close_callback(sub { $reactor->shutdown; });
+
+my $summary = gettext("Warning: I2P will be removed in Tails 2.12");
+$notify->create(summary => $summary,
+ actions => { 'moreinfo' => gettext('Learn more'), },
+ hints => { 'transient' => 1, },
+ timeout => 0)->show();
+
+$reactor->run;