Skip to content

Commit 11bc4b1

Browse files
committed
Merge remote-tracking branch 'origin/pr/624'
* origin/pr/624: Fall back to the absolute path for fstrim if needed
2 parents 9f4552b + a325b62 commit 11bc4b1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

qubes-rpc/post-install.d/95-fstrim.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@
66
if [ -f /run/qubes/persistent-full ]
77
then
88
echo "Trimming qube storage. This may take some time..."
9-
fstrim -av
9+
if command -v fstrim >/dev/null; then
10+
fstrim -av
11+
else
12+
# /usr/sbin might not be in $PATH, fall back to the absolute path
13+
# if necessary
14+
/usr/sbin/fstrim -av
15+
fi
1016
fi

0 commit comments

Comments
 (0)