fix: Add patch to avoid conflicts with Fedora's trim service

This commit is contained in:
Kyle Gospodnetich 2024-03-01 09:41:30 -08:00
parent dee6d08c31
commit ed02a6526c
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,19 @@
--- a/usr/lib/hwsupport/trim-devices.sh
+++ b/usr/lib/hwsupport/trim-devices.sh
@@ -78,6 +78,16 @@
return;
}
+# If fstrim has been disabled by the end-user, do nothing
+if ! systemctl is-enabled fstrim.timer; then
+ exit
+fi
+
+# If the upstream fstrim service is currently running, do nothing
+if systemctl is-active fstrim.service; then
+ exit
+fi
+
# In some cases it is unsafe to trim an sdcard. When we detect this case
# lets just trim the partitions on the internal drive which we know are
# safe to trim/discard

View File

@ -21,6 +21,7 @@ Patch6: systemd-run.patch
Patch7: priv-write.patch
Patch8: biosupdate.patch
Patch9: gnome.patch
Patch10: fstrim.patch
Requires: python3
Requires: python3-evdev