The officially official Devuan Forum!

You are not logged in.

#1 2018-02-24 06:17:03

GNUser
Member
Registered: 2017-03-16
Posts: 333  

anacron not working in ascii [SOLVED]

Anacron is not running on my laptop, regardless of whether it is plugged in or not.

Here is my /etc/anacrontab (it is the same as on my Devuan Jessie partition):

# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root

# These replace cron's entries
1	5	cron.daily	run-parts --report /etc/cron.daily
7	10	cron.weekly	run-parts --report /etc/cron.weekly
@monthly	15	cron.monthly	run-parts --report /etc/cron.monthly

# bruno
7 1 maintenance /opt/scripts/jobs-maintenance

Here is /etc/default/anacrontab:

# If set to "yes", start anacron even when on battery power.  By
# default, the /etc/init.d/anacron script tries to avoid running
# anacron unless on AC power, so as to avoid running down the battery.
# (Things like the locate updatedb cause a lot of I/O.)

ANACRON_RUN_ON_BATTERY_POWER=yes

I already did this, too (I had to do it in Jessie in order for anacron to run while on battery power):

$ sudo chmod a-x /usr/lib/pm-utils/power.d/anacron

Looking at /var/log/syslog shows no entries by anacron. Also, /var/spool/anacron is an empty directory with no timestamps. I've tried rebooting and resuming from suspend, both on AC and battery power, and anacron gives no signs of life.

I have the 2.3-24 version installed. I also tried uninstalling it and installing the 2.3-23 version from Devuan Jessie and it made no difference.

Any ideas? Anacron is mission-critical for me.

Last edited by GNUser (2018-02-24 17:55:32)

Offline

#2 2018-02-24 06:40:03

GNUser
Member
Registered: 2017-03-16
Posts: 333  

Re: anacron not working in ascii [SOLVED]

After much snooping around, I discovered that /usr/sbin/anacron was a link to /bin/true (???)
The anacron package actually installs /usr/sbin/anacron.orig.anacron (???)
This fixed the issue: sudo ln -fs /usr/sbin/anacron.orig.anacron /usr/sbin/anacron

Very, very strange.

Offline

#3 2018-02-24 14:31:01

fsmithred
Administrator
Registered: 2016-11-25
Posts: 737  

Re: anacron not working in ascii [SOLVED]

I just checked one of my ascii installs, and /usr/sbin/anacron is a real file. There are entries in /var/log/syslog, and it looks like it runs when I boot the VM. My anacrontab looks like yours, there are files in /var/spool/anacron for cron.daily .weekly and .monthly with timestamps that match what syslog shows. And my /etc/default/anacron says "No".

'apt-file find /usr/sbin/anacron.orig.anacron' turned up nothing. Maybe dpkg -S would show something on your end. Or 'grep anacron /root/.history' to see if you did something and forgot about it.

Offline

#4 2018-02-24 15:19:44

GNUser
Member
Registered: 2017-03-16
Posts: 333  

Re: anacron not working in ascii [SOLVED]

Thank you for the suggestions, fsmithred.

I have begun solving the mystery:

bruno@thinkpad:~$ dpkg -S anacron.orig.anacron
diversion by live-config from: /usr/sbin/anacron
diversion by live-config to: /usr/sbin/anacron.orig.anacron

bruno@thinkpad:~$ dpkg -l | grep live-config
ii  live-config                 5.20170112+deb9u1      all          Live System Configuration Components
ii  live-config-doc           5.20170112+deb9u1      all          Live System Configuration Components (documentation)
ii  live-config-sysvinit     5.20170112+deb9u1      all          Live System Configuration Components (sysvinit backend)

I did not install any live-config packages, so they must have come with Miyo. I will try uninstalling live-config* and reinstalling anacron.

Offline

#5 2018-02-24 15:29:38

GNUser
Member
Registered: 2017-03-16
Posts: 333  

Re: anacron not working in ascii [SOLVED]

No luck. I purged all three live-config packages and ancron, rebooted, and reinstalled anacron. Similar shenanigans (at least now the symlink is pointing to something sensible and not /bin/true):

bruno@thinkpad:~$ ls -l /usr/sbin/anacron
lrwxrwxrwx 1 root root 30 Feb 24 01:36 /usr/sbin/anacron -> /usr/sbin/anacron.orig.anacron
bruno@thinkpad:~$ dpkg -S anacron.orig.anacron
diversion by live-config from: /usr/sbin/anacron
diversion by live-config to: /usr/sbin/anacron.orig.anacron

This is my /etc/apt/sources.list:

deb http://pkgmaster.devuan.org/merged/ ascii main 
deb http://pkgmaster.devuan.org/merged/ ascii-security main
deb http://pkgmaster.devuan.org/merged/ ascii-updates main

fsmithred, are you sure that your /usr/sbin/anacron is a real file and not a link? If you are sure, what am I missing?

What is this live-config business anyway? Can I get rid of it?

Last edited by GNUser (2018-02-24 15:30:49)

Offline

#6 2018-02-24 17:54:40

GNUser
Member
Registered: 2017-03-16
Posts: 333  

Re: anacron not working in ascii [SOLVED]

I got it. Even after uninstalling the live-config* packages, the diversion that it created continues to live in dpkg, so one has to manually remove the diversion:

root@thinkpad:/home/bruno# dpkg-divert --list | grep anacron
diversion of /usr/sbin/anacron to /usr/sbin/anacron.orig.anacron by live-config

root@thinkpad:/home/bruno# dpkg-divert --remove /usr/sbin/anacron

root@thinkpad:/home/bruno# dpkg-divert --list | grep anacron
# no hits

Now I reinstall anacron and /usr/sbin/anacron is a real file as expected smile

Last edited by GNUser (2018-02-24 17:56:23)

Offline

Board footer