Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service files use ConditionPathExists and ConditionFileNotEmpty instead of Assertion #1521

Open
sents opened this issue Dec 22, 2024 · 0 comments

Comments

@sents
Copy link

sents commented Dec 22, 2024

The service files provided in scripts/pkg/linux/cnspec.service and scripts/pkg/debian/cnspec.service,
use ConditionPathExists=/etc/opt/mondoo/ and ConditionFileNotEmpty=/etc/opt/mondoo/mondoo.yml.

This will silently skip the unit as if it were not applicable to the system and will not cause the unit to fail.
Is this the intended behavior?

The systemd documentation suggests Condition checks for skipping inapplicable
units and Assert checks for failing prerequisites. It seems to me that an assertion better fits the scenario
of cnspec not having access to a working directory or a configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant