2

Why systemd complains?

Jul  5 09:55:33 st701a-9 systemd[1]: [/etc/systemd/system/load-xyz-modules.service:7] Unknown lvalue 'ExecCondition' in section 'Service'

The service configuration /etc/systemd/system/load-xyz-modules.service:

[Unit]
Description=Load xyz kernel modules

[Service]
RemainAfterExit=yes
Type=oneshot
ExecCondition=/bin/sh -c '***'
ExecStart=/bin/sh -c '***'
ExecStop=/bin/sh -c '***'

[Install]
WantedBy=multi-user.target

If I read the systemd man page correctly, ExecCondition is an option of the section [Service].

Edit: The issue happened on Debian stretch.

2
  • Which Linux distribution are you using? Jul 5, 2021 at 11:22
  • Oh, I've to mention it indeed. I've faced the issue on Debian stretch.
    – palik
    Jul 5, 2021 at 12:39

1 Answer 1

3

Debian 9 has systemd 232, which does not include ExecCondition=. This was added in systemd 243. This means it is also not available in Debian 10, which has only systemd 241. If this functionality is critical, you should choose a different Linux distribution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .