Enable fstrim.timer on upgrades

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=2262393 for upgrades.
Since the timer was not enabled previously, we want to enable it here so that
https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer is actually true.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-02-06 11:06:22 +01:00
parent e5d9a1e3ef
commit dc6a971801

View File

@ -470,9 +470,9 @@ fi
%postun -n uuidd
%systemd_postun_with_restart uuidd.socket uuidd.service
%triggerpostun -- util-linux < 2.35.1-7
%triggerpostun -- util-linux < 2.40-0.2
if [ $1 -gt 1 ] && [ -x /usr/bin/systemctl ] ; then
# Enable fstrim.timer for upgrades to F32
# Enable fstrim.timer for upgrades from older versions
/usr/bin/systemctl --no-reload preset fstrim.timer || :
fi