#945862 /etc/cron.daily/apt-compat: Use "sleep" later in the script

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Bjarni Ingi Gislason
Date:
2019-11-30 17:12:02 UTC
Severity:
minor
#945862#5
Date:
2019-11-29 23:51:51 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

  The "sleep" funtion was shown in the output of "ps".

###

  Do not put the script to a sleep, if it is afterwards not going to do
its job.

  Therefor call "random_sleep" after "check_power || exit 0".

N.B. Other bug reports about the file are #829443 and #898312.

#945862#10
Date:
2019-11-30 17:10:03 UTC
From:
To:
That would be wrong. If we sleep 30 min and you remove your power within
those 30 minutes, we'd run when we shouldn't.

I guess we could do the power check twice. But then people might complain
that we check power first and the script does not run because they plugged
in too late or something.

I mean, meh, you could just use systemd if you want sane behavior.