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

2022-01-02 Thread Alexandre Detiste
control: reassign -1 dma

Hi,

This looks more like normal behaviour.

tchet@brix ~ $ [ -x /usr/sbin/dma ] && /usr/sbin/dma -q1
tchet@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.



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

2018-12-18 Thread Erwan David
Package: systemd-cron
Version: 1.5.14-2
Severity: important

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

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.


-- Package-specific info:
-- output of systemd-delta

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'stable'), (300, 
'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd-cron depends on:
ii  libc6 2.28-2
ii  python3   3.6.7-1
ii  systemd-sysv  239-15

Versions of packages systemd-cron recommends:
ii  postfix [mail-transport-agent]  3.3.2-1

systemd-cron suggests no packages.

-- Configuration Files:
/etc/anacrontab changed:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root
START_HOURS_RANGE=4-6
1   5   cron.daily  run-parts --report /etc/cron.daily
7   10  cron.weekly run-parts --report /etc/cron.weekly
@monthly15  cron.monthlyrun-parts --report /etc/cron.monthly


-- no debconf information