Bug#916749: systemd-cron: Tries to launch unreachable commands

Alexandre Detiste alexandre.detiste at gmail.com
Sun Jan 2 17:50:00 GMT 2022


control: reassign -1 dma

Hi,

This looks more like normal behaviour.

tchet at brix ~ $ [ -x /usr/sbin/dma ] && /usr/sbin/dma -q1
tchet at brix ~ $ echo $?
1

The crontab should maybe have been written this way, to always return "true".

[ -x /usr/sbin/dma ] && /usr/sbin/dma -q1 || true


I'm assigningg the bug to "dma".
dma maintainers can close it if they feel so.

Greetings,
----

Package: systemd-cron
Version: 1.5.14-2
Severity: important

Dear Maintainer,

I just switched from cron to systemd cron. I now have every 5 mintes
following email :

* cron-dma-root-0.service - [Cron] "*/5 * * * * root [ -x
/usr/sbin/dma ] && /usr/sbin/dma -q1"
   Loaded: loaded (/etc/cron.d/dma; generated)
   Active: failed (Result: exit-code) since Tue 2018-12-18 09:10:03
CET; 74ms ago
     Docs: man:systemd-crontab-generator(8)
  Process: 8569 ExecStart=/bin/sh
/run/systemd/generator/cron-dma-root-0.sh (code=exited,
status=1/FAILURE)
 Main PID: 8569 (code=exited, status=1/FAILURE)

Dec 18 09:10:03 ot-fixe-008 systemd[1]: Starting [Cron] "*/5 * * * *
root [ -x /usr/sbin/dma ] && /usr/sbin/dma -q1"...
Dec 18 09:10:03 ot-fixe-008 systemd[1]: cron-dma-root-0.service: Main
process exited, code=exited, status=1/FAILURE
Dec 18 09:10:03 ot-fixe-008 systemd[1]: cron-dma-root-0.service:
Failed with result 'exit-code'.
Dec 18 09:10:03 ot-fixe-008 systemd[1]: Failed to start [Cron] "*/5 *
* * * root [ -x /usr/sbin/dma ] && /usr/sbin/dma -q1".
Dec 18 09:10:03 ot-fixe-008 systemd[1]: cron-dma-root-0.service:
Triggering OnFailure= dependencies.

/usr/sbin/dma does not exist, thus the action should not be executed.



More information about the Pkg-systemd-maintainers mailing list