[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: unattended-upgrades does not install upgrades on shutdown



On Tue, 15 Oct 2019 11:31:22 +1100
Keith Bainbridge <ke1th3216@gmail.com> wrote:

> It was intuition rather than any knowledge I had - beyond the fact
> that sometimes upgrade takes longer than normal.
> 
> How to prevent a repeat is the real question.

Upgrades and updates often require fetching across the network, which
can induce network delays. For other reasons entirely, I prefetch my
upgrades so they are on the computer before I start the upgrades. I put
the following into a file in /etc/cron.d:


# cron replaces the percent sign with a new line, so we escape it with a back slash.
   5      3      *                *	*	root	sleep $( echo $((1 + RANDOM \% 1200)) ) ; /usr/bin/apt-get update > /dev/null && /usr/bin/apt-get -dy dist-upgrade > /dev/null

(Pasted with long lines; your mail client may mangle it.)

You might do something similar before the automatic upgrades occur.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: