#!/bin/sh
# should be safe this late

! grep -Fwq notrim /proc/cmdline || exit 0

echo
echo "running 'fstrim -av' (add notrim to kernel cmdline to suppress)"
fstrim -av ||:
