Public bug reported:

/etc/crontab uses

   test -x /usr/sbin/anacron

for whether anacron is handling the daily/weekly/monthly cron jobs on a system.
This means that if anacron is installed it is assumed to be running.
However, this is a service, and can be disabled and since the package is 
installed by default it's simpler to just disable it on systems where you don't 
want it running rather then remove it.

Changing the test to be:

    systemctl --no-pager is-enabled anacron 2>/dev/null

(and changing the || to be &&, since the login is now reversed) caters
for either case by checking what you really wish to know - is it active,
not just installed.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: cron 3.0pl1-128ubuntu5
ProcVersionSignature: Ubuntu 4.13.0-37.42-generic 4.13.13
Uname: Linux 4.13.0-37-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: KDE
Date: Thu Mar 29 13:33:47 2018
InstallationDate: Installed on 2017-11-01 (147 days ago)
InstallationMedia: Kubuntu 17.10 "Artful Aardvark" - Release amd64 (20171017.1)
SourcePackage: cron
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: cron (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug artful

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1759846

Title:
  Incorrect test used for anacron being active

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1759846/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to