I'm working on building initramfs images directly from normal
packages, which means that the pristine system rpms should behave
correctly as much as possible also in the initrd. There usually isn't
enough time for the timer to actually fire, but starting it gives a
line on the console and generally looks confusing and sloppy. So let's
skip the timer if it ever ends up being enabled in the initrd.
Checking for /etc/initrd-release is the standard condition that
systemd's initrd units use.
In 9995da0 we added support to fstrim to be able to fall back to
`/proc/self/mountinfo` if `/etc/fstab` didn't exist, but we forgot
to remove the `/etc/fstab` condition from the timer. Let's remove
that condition from the timer so we can go back to periodically
running `fstrim.service`.
It should not matter when exactly fstrim runs, so spread these tasks across
time to help server farms and such to simultanously get busy with io.
Addresses: https://bugs.launchpad.net/bugs/1833593
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Container type implies the following products:
openvz OpenVZ/Virtuozzo
lxc Linux container implementation by LXC
lxc-libvirt Linux container implementation by libvirt
systemd-nspawn systemd's minimal container implementation, see systemd-nspawn(1)
docker Docker container manager
podman Podman container manager
rkt rkt app container runtime
wsl Windows Subsystem for Linux
References:
https://www.freedesktop.org/software/systemd/man/systemd.unit.htmlhttps://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html#Fix: #840
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>