From e692ba7abc905ba805967e125c63f355ece37149 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 1 Mar 2024 09:43:26 -0800 Subject: [PATCH] chore: Add useful messages about trim status --- spec_files/jupiter-hw-support/fstrim.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 +