Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

weird anacron issue

Started by joealuminium, March 17, 2024, 09:18:15 PM

Previous topic - Next topic

joealuminium

Hi,

I've just installed SparkyLinux (SparkyLinux 7.3)on my main PC and I had a weird issue with anacron.
It didn't appear to do anything.

I had set up a couple of backup scripts one in /etc/cron.daily and one in /etc/cron.monthly they work fine and run as they should with run-parts /etc/cron.daily but not when invoked by anacron, nothing happens. No timestamp files were created in /var/spool/anacron.

When I ran anacron -u from the command line again no timestamp files were created. After a bit of digging and removing and installing anacron I discovered that /usr/sbin/anacron was a symbolic link to /bin/true and there was a file in /usr/sbin called anacron.orig.anacron. When I removed anacron from the system the file /usr/sbin/anacron.orig.anacron was removed. It reappeared when I installed anacron.

I removed the symbolic link from /usr/sbin/anacron to /bin/true and created a symbolic link to anacron.orig.anacron and now everything appears to work.

Is this intentional? A known issue? or an oversight.     

Cheers

pgf

I think this is the same bug that's been discussed for a different distro, over here: 
  https://dev1galaxy.org/viewtopic.php?id=5096

It seems that the live install does a "diversion" of anacron, and replaces it with a symlink to /bin/true, and I'm guessing that that doesn't get cleaned up properly.

Running the command:
dpkg-divert --list| grep live-configgives a single line of output:
diversion of /usr/sbin/anacron to /usr/sbin/anacron.orig.anacron by live-config

It seems that the live install leaves behind a debian "diversion" of /usr/sbin/anacron, which causes it to install the anacron binary to /usr/sbin/anacron.orig.anacron instead.

I only partly understand all of this, but I think this will work:

To fix this, first:
    sudo dpkg-divert --remove /usr/sbin/anacron
Then install the anacron package.

If anacron was already installed, then instead, you'll need to move the anacron binary to its proper place:
    sudo mv /usr/sbin/anacron.orig.anacron /usr/sbin/anacron

pgf

By the way, I encountered this problem doing an install from the 2024.08 live USB.  So it's still in the latest release.

View the most recent posts on the forum