I have overridden the dnf-makecache not to put my system in a failed state every time there is a problem on the internet (shocker!) but it seems to be ignored.
# sc cat dnf-makecache.service
# /usr/lib/systemd/system/dnf-makecache.service
[Unit]
Description=dnf makecache
# On systems managed by either rpm-ostree/ostree, dnf is read-only;
# while someone might theoretically want the cache updated, in practice
# anyone who wants that could override this via a file in /etc.
ConditionPathExists=!/run/ostree-booted
After=network-online.target
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
Environment="ABRT_IGNORE_PYTHON=1"
ExecStart=/usr/bin/dnf makecache --timer
# /etc/systemd/system/dnf-makecache.service.d/override.conf
[Service]
ExecStart=-/usr/bin/dnf makecache --timer
[root@lxd10 ~]# man systemd.service
[root@lxd10 ~]# sc cat dnf-makecache
# /usr/lib/systemd/system/dnf-makecache.service
[Unit]
Description=dnf makecache
# On systems managed by either rpm-ostree/ostree, dnf is read-only;
# while someone might theoretically want the cache updated, in practice
# anyone who wants that could override this via a file in /etc.
ConditionPathExists=!/run/ostree-booted
After=network-online.target
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
Environment="ABRT_IGNORE_PYTHON=1"
ExecStart=/usr/bin/dnf makecache --timer
# /etc/systemd/system/dnf-makecache.service.d/override.conf
[Service]
ExecStart=-/usr/bin/dnf makecache --timer
but it still fails and the system state is degraded
Jun 28 09:08:35 lxd10.2e-systems.com systemd[1]: dnf-makecache.service: Main process exited, code=exited, status=1/FAILURE
Jun 28 09:08:35 lxd10.2e-systems.com systemd[1]: dnf-makecache.service: Failed with result 'exit-code'.
Jun 28 09:08:35 lxd10.2e-systems.com systemd[1]: Failed to start dnf makecache.
but the manual explicitly says the the exit code will be ignored if the exec path is prefixed by a dash. What am I doing wrong? Maybe because it is run by a timer?