Skip to content

Commit

Permalink
fix: Add patch to avoid conflicts with Fedora's trim service
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Mar 1, 2024
1 parent dee6d08 commit ed02a65
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec_files/jupiter-hw-support/fstrim.patch
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed02a65

Please sign in to comment.