diff --git a/spec_files/jupiter-hw-support/fstrim.patch b/spec_files/jupiter-hw-support/fstrim.patch index 6f85f7b2f2..51d77a1027 100644 --- a/spec_files/jupiter-hw-support/fstrim.patch +++ b/spec_files/jupiter-hw-support/fstrim.patch @@ -1,16 +1,18 @@ --- a/usr/lib/hwsupport/trim-devices.sh +++ b/usr/lib/hwsupport/trim-devices.sh -@@ -78,6 +78,16 @@ +@@ -78,6 +78,18 @@ return; } +# If fstrim has been disabled by the end-user, do nothing +if ! systemctl is-enabled fstrim.timer; then ++ echo "fstrim.timer disabled, exiting trim-devices.sh" + exit +fi + +# If the upstream fstrim service is currently running, do nothing +if systemctl is-active fstrim.service; then ++ echo "fstrim.service is currently active, exiting trim-devices.sh" + exit +fi +