-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add patch to avoid conflicts with Fedora's trim service
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters