]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fstrim: run service and timer only if /etc/fstab is present
authorLuca BRUNO <luca.bruno@coreos.com>
Mon, 27 Apr 2020 10:06:07 +0000 (10:06 +0000)
committerLuca BRUNO <luca.bruno@coreos.com>
Mon, 27 Apr 2020 10:08:53 +0000 (10:08 +0000)
commitdac72b6e7e64844afb686d5d4b640df50028ddbb
tree4735bfd748abd5964350181b25d76ea35492cf24
parent32ff1494e3bbf995199ad6d4bde911a3bab7ccf6
fstrim: run service and timer only if /etc/fstab is present

The timer and service units run `fstrim --fstab`, which strictly
depends on `/etc/fstab` being present in the OS. This adds relevant
condition statements to the units, in order to skip them and avoid
runtime failures.

Ref: https://github.com/karelzak/util-linux/issues/673#issuecomment-409246816
Ref: https://github.com/coreos/bugs/issues/2591
Ref: https://github.com/coreos/fedora-coreos-tracker/issues/468

Signed-off-by: Luca BRUNO <luca.bruno@coreos.com>
sys-utils/fstrim.service.in
sys-utils/fstrim.timer