Score:1

systemd: Unknown lvalue 'ExecCondition' in section 'Service

ng flag

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.

Michael Hampton avatar
cz flag
Which Linux distribution are you using?
palik avatar
ng flag
Oh, I've to mention it indeed. I've faced the issue on Debian stretch.
Score:2
cz flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.