feat: add ZFS deprecation notifier (#2613)
* feat: add ZFS deprecation notifier This will spawn a one-time notification that has to be dismissed by the user if ZFS is being used. xref: https://github.com/ublue-os/aurora/issues/1765 resolves: https://github.com/ublue-os/aurora/issues/2210 * fix typo * be more explicit in msg Co-authored-by: Adam Fidel <ledif@users.noreply.github.com> * run it always every week The chance that people will see it are way bigger this way. * only actually enable on systems that have ship zfs --------- Co-authored-by: Adam Fidel <ledif@users.noreply.github.com>
This commit is contained in:
parent
790a6a81a3
commit
1304b8f7f8
4 changed files with 42 additions and 0 deletions
|
|
@ -43,6 +43,11 @@ systemctl enable uupd.timer
|
|||
# Disable the old update timer
|
||||
systemctl disable rpm-ostreed-automatic.timer
|
||||
|
||||
# TODO: Remove with F45 release
|
||||
if [[ "${AKMODS_FLAVOR}" =~ coreos ]]; then
|
||||
systemctl enable aurora-zfs-deprecation-notifier.timer
|
||||
fi
|
||||
|
||||
# Hide Desktop Files. Hidden removes mime associations
|
||||
for file in htop nvtop; do
|
||||
if [[ -f "/usr/share/applications/${file}.desktop" ]]; then
|
||||
|
|
|
|||
11
system_files/shared/usr/bin/aurora-zfs-deprecation-notifier
Executable file
11
system_files/shared/usr/bin/aurora-zfs-deprecation-notifier
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
NOTIFICATION="/usr/bin/notify-send --app-name=Aurora --icon distributor-logo --urgency critical 'ZFS support is ending in October 2026' 'An attached drive contains a ZFS pool. Please see https://github.com/ublue-os/aurora/issues/1765 for more info.'"
|
||||
|
||||
USERS="$(loginctl list-users --no-legend | awk '$1 != 0 {print $2}')"
|
||||
|
||||
for username in ${USERS}; do
|
||||
machinectl shell "${username}@.host" /usr/bin/bash -c "${NOTIFICATION}"
|
||||
done
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Aurora ZFS Deprecation Notifier
|
||||
Documentation=https://github.com/ublue-os/aurora/issues/1765
|
||||
After=local-fs.target
|
||||
Wants=local-fs.target
|
||||
ConditionPathIsReadWrite=/etc
|
||||
ConditionPathExists=/usr/bin/zfs
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecCondition=/usr/bin/bash -c "/usr/bin/lsblk -o FSTYPE | /usr/bin/grep -q ^zfs"
|
||||
ExecStart=/usr/bin/aurora-zfs-deprecation-notifier
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Run aurora-zfs-deprecation-notifier 20 mins after boot
|
||||
|
||||
[Timer]
|
||||
OnBootSec=20min
|
||||
Unit=aurora-zfs-deprecation-notifier.service
|
||||
OnUnitActiveSec=1w
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Reference in a new issue