Skip to content

nftables.service: add ConditionFileNotEmpty=/etc/nftables.conf

Luca Boccassi requested to merge bluca/pkg-nftables:fileexists into master

When booting with an empty /etc/ (factory reset, image-based build with only /usr/) nftables.service fails:

Feb 28 00:18:41 localhost nft[475]: internal:0:0-0: Error: Could not open file "/etc/nftables.conf": No such file or directory Feb 28 00:18:41 localhost systemd[1]: nftables.service: Main process exited, code=exited, status=1/FAILURE

Add a condition to the unit, so that it is skipped unless a config file actually exists, to avoid spurious failures.

Merge request reports

Loading