summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
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-32-bit-notify-user.service10
-rwxr-xr-xconfig/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user64
-rwxr-xr-xconfig/chroot_local-includes/usr/local/lib/tails-virt-notify-user5
-rw-r--r--config/chroot_local-packageslists/tails-common.list2
5 files changed, 80 insertions, 2 deletions
diff --git a/config/chroot_local-hooks/52-update-rc.d b/config/chroot_local-hooks/52-update-rc.d
index 9e080fb..48cfbbb 100755
--- a/config/chroot_local-hooks/52-update-rc.d
+++ b/config/chroot_local-hooks/52-update-rc.d
@@ -48,6 +48,7 @@ systemctl enable tails-tor-has-bootstrapped-flag-file.service
systemctl enable tor-controlport-filter.service
# Enable our own systemd user unit files
+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
diff --git a/config/chroot_local-includes/usr/lib/systemd/user/tails-32-bit-notify-user.service b/config/chroot_local-includes/usr/lib/systemd/user/tails-32-bit-notify-user.service
new file mode 100644
index 0000000..ab8091d
--- /dev/null
+++ b/config/chroot_local-includes/usr/lib/systemd/user/tails-32-bit-notify-user.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Warn the user if Tails is running on a 32-bit processor
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/lib/tails-32-bit-notify-user
+RemainAfterExit=yes
+
+[Install]
+WantedBy=desktop.target
diff --git a/config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user b/config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user
new file mode 100755
index 0000000..6084cf5
--- /dev/null
+++ b/config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user
@@ -0,0 +1,64 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+#man{{{
+
+=head1 NAME
+
+tails-32-bit-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 Path::Tiny;
+use POSIX;
+
+### initialization
+setlocale(LC_MESSAGES, "");
+textdomain("tails");
+
+### callbacks
+
+sub action_cb {
+ my $reactor = shift;
+ exec(
+ '/usr/local/bin/tails-documentation',
+ 'news/Tails_3.0_will_require_a_64-bit_processor'
+ );
+ $reactor->shutdown;
+}
+
+### main
+
+exit 0 if grep {/^flags\s+:.*\s[l][m]\s/xms} path('/proc/cpuinfo')->lines_utf8;
+
+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: Tails 3.0 won't work on this computer!");
+my $body = gettext("Tails 3.0 will require a 64-bit processor.");
+$notify->create(summary => $summary,
+ body => $body,
+ actions => { 'moreinfo' => gettext('Learn more'), },
+ hints => { 'transient' => 1, },
+ timeout => 0)->show();
+
+$reactor->run;
diff --git a/config/chroot_local-includes/usr/local/lib/tails-virt-notify-user b/config/chroot_local-includes/usr/local/lib/tails-virt-notify-user
index d71255b..7e53800 100755
--- a/config/chroot_local-includes/usr/local/lib/tails-virt-notify-user
+++ b/config/chroot_local-includes/usr/local/lib/tails-virt-notify-user
@@ -37,8 +37,9 @@ textdomain("tails");
sub action_cb {
my $reactor = shift;
exec(
- '/usr/local/bin/tor-browser',
- 'file:///usr/share/doc/tails/website/doc/advanced_topics/virtualization.en.html#security'
+ '/usr/local/bin/tails-documentation',
+ 'doc/advanced_topics/virtualization',
+ 'security'
);
$reactor->shutdown;
}
diff --git a/config/chroot_local-packageslists/tails-common.list b/config/chroot_local-packageslists/tails-common.list
index 147394f..e01c336 100644
--- a/config/chroot_local-packageslists/tails-common.list
+++ b/config/chroot_local-packageslists/tails-common.list
@@ -48,6 +48,8 @@ gksu
libdesktop-notify-perl
# Needed by tails-transform-mirror-url
nodejs
+# Needed by tails-32-bit-notify-user
+libpath-tiny-perl
### Software