Page 1 of 1

Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Posted: Sun 20. Sep 2020, 21:28
by gustavohellwig
/etc/cron.daily/check_updates:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.


- Looks like that the solution is just to replace the script:
from: apt update
to: apt-get update

E.g: I saw this in the internet: If I run this, I have the same error:

Code: Select all

sudo apt update | grep packages | cut -d '.' -f 1
But if I run this, I doesn't:

Code: Select all

sudo apt-get update | grep packages | cut -d '.' -f 1

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Posted: Mon 21. Sep 2020, 18:58
by gustavohellwig
Hey guys, some ideas on how to solve this?
I'm receiving an email every day about that.

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Posted: Tue 22. Sep 2020, 09:12
by Alexander
So replacing the content of the script with the line which does not result in the Warning message should fix it.

Anyway, this script seams not to be part of minimal OS installation and does not belong to KeyHelp either. Therefore the problem you describe here is not really related to KeyHelp.

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Posted: Tue 22. Sep 2020, 14:59
by gustavohellwig
OK.
The problem is fixed with the replacement of the content from the file: /etc/cron.daily/check_updates adding apt-get instead of just apt.
I did the test even yesterday before your reply and the email was not sent today.

So, how to reply to that bug be fixed?

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Posted: Tue 22. Sep 2020, 15:07
by Alexander
Like I said, this file 'check_updates' is not part of KeyHelp or of a minimal operating system installation. You should point your request for fixing to the maintainer of the application, or to the people who installed this file on your server.

This has nothing do with KeyHelp nor is it a bug of KeyHelp.