systemd-cron: cron-failure@.service outputs "Unit cron\x2ddaily.service could not be found"
cron-failure@.service emails “Unit cron\x2ddaily.service could not be found” when a script in cron.daily fails.
It comes from this line: https://github.com/systemd-cron/systemd-cron/blob/d6c33def3ad1787e848faa6eed360c7ffe3ccc49/src/bin/mail_for_job.sh#L100 because $unit is still escaped after being passed through from cron-failure@.service.
Version: 2.2.0 OS: Gentoo
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 20 (13 by maintainers)
Commits related to this issue
- Use %n:Failure instead of fixed name in runparts' OnFailure; the \x2d in the fixed part was incompatible with m_f_j Fixes: #142 — committed to systemd-cron/systemd-cron by nabijaczleweli 4 months ago
Yep this works, I’m happy blaming systemd.
It just passes
--enable-runpartsto the configure script and also ensures debianutils is installed (I assume that’s the package that contains the run-parts script itself).The build file is here for v2.3.0: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-process/systemd-cron/systemd-cron-2.3.0-r2.ebuild
Yes, but give me a few days.
With --enable-runparts, the fixed
cron-{monthly|...}.serviceunits havebut the normally-generated units have
On%s=cron-mail@%%n:%s, soOnFailure=cron-mail@%n:Failure, which expands toOnFailure=cron-zfsutils-linux-root-0.service:Failure, so this is definitely an issue with the runparts mode.@daviessm can you try the runparts mode with 484b0e7309cd9aa7f19ab6cf55af481629ad0788?