| ubuntu@juju-87625f-hloeung-100:/etc/apt$ sudo apt-get install update-notifier-common
| Reading package lists... Done
| Building dependency tree
| Reading state information... Done
| The following packages were automatically installed and are no longer required:
| dnsmasq-base kpartx libfl2 libidn11 libsgutils2-2 liburcu6 sg3-utils sg3-utils-udev
| Use 'sudo apt autoremove' to remove them.
| The following packages will be upgraded:
| update-notifier-common
| 1 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
| Need to get 133 kB of archives.
| After this operation, 0 B of additional disk space will be used.
| Get:1 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 update-notifier-common all 3.192.30.9 [133 kB]
| Fetched 133 kB in 0s (3458 kB/s)
| (Reading database ... 130802 files and directories currently installed.)
| Preparing to unpack .../update-notifier-common_3.192.30.9_all.deb ...
| Unpacking update-notifier-common (3.192.30.9) over (3.192.30.8) ...
| Setting up update-notifier-common (3.192.30.9) ...
| Installing new version of config file /etc/cron.weekly/update-notifier-common ...
Comparing it with the old backup copy:
| ubuntu@juju-87625f-hloeung-100:/etc/apt$ diff -Naurp ~/update-notifier-common /etc/cron.weekly/update-notifier-common
| --- /home/ubuntu/update-notifier-common 2021-08-13 05:55:55.859177053 +0000
| +++ /etc/cron.weekly/update-notifier-common 2021-08-05 14:01:11.000000000 +0000
| @@ -4,5 +4,12 @@ set -e
|
| [ -x /usr/lib/ubuntu-release-upgrader/release-upgrade-motd ] || exit 0
|
| -# Check to see whether there is a new version of Ubuntu available
| -/usr/lib/ubuntu-release-upgrader/release-upgrade-motd
| +sleep_then_check() {
| + # Sleep for up to an hour to spread the load of checking for updates on
| + # the Ubuntu infrastructure
| + sleep $(shuf -i 1-3600 -n 1)
| + # Check to see whether there is a new version of Ubuntu available
| + /usr/lib/ubuntu-release-upgrader/release-upgrade-motd
| +}
| +
| +sleep_then_check &
Looks good to me:
| ubuntu@ juju-87625f- hloeung- 100:/etc/ apt$ sudo apt-get install update- notifier- common notifier- common us.archive. ubuntu. com/ubuntu focal-proposed/main amd64 update- notifier- common all 3.192.30.9 [133 kB] notifier- common_ 3.192.30. 9_all.deb ... notifier- common (3.192.30.9) over (3.192.30.8) ... notifier- common (3.192.30.9) ... weekly/ update- notifier- common ...
| Reading package lists... Done
| Building dependency tree
| Reading state information... Done
| The following packages were automatically installed and are no longer required:
| dnsmasq-base kpartx libfl2 libidn11 libsgutils2-2 liburcu6 sg3-utils sg3-utils-udev
| Use 'sudo apt autoremove' to remove them.
| The following packages will be upgraded:
| update-
| 1 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
| Need to get 133 kB of archives.
| After this operation, 0 B of additional disk space will be used.
| Get:1 http://
| Fetched 133 kB in 0s (3458 kB/s)
| (Reading database ... 130802 files and directories currently installed.)
| Preparing to unpack .../update-
| Unpacking update-
| Setting up update-
| Installing new version of config file /etc/cron.
Comparing it with the old backup copy:
| ubuntu@ juju-87625f- hloeung- 100:/etc/ apt$ diff -Naurp ~/update- notifier- common /etc/cron. weekly/ update- notifier- common update- notifier- common 2021-08-13 05:55:55.859177053 +0000 weekly/ update- notifier- common 2021-08-05 14:01:11.000000000 +0000 ubuntu- release- upgrader/ release- upgrade- motd ] || exit 0 ubuntu- release- upgrader/ release- upgrade- motd ubuntu- release- upgrader/ release- upgrade- motd
| --- /home/ubuntu/
| +++ /etc/cron.
| @@ -4,5 +4,12 @@ set -e
|
| [ -x /usr/lib/
|
| -# Check to see whether there is a new version of Ubuntu available
| -/usr/lib/
| +sleep_then_check() {
| + # Sleep for up to an hour to spread the load of checking for updates on
| + # the Ubuntu infrastructure
| + sleep $(shuf -i 1-3600 -n 1)
| + # Check to see whether there is a new version of Ubuntu available
| + /usr/lib/
| +}
| +
| +sleep_then_check &
| ubuntu@ juju-87625f- hloeung- 100:/etc/ cron.weekly$ apt-cache policy update- notifier- commonupdate- notifier- common: us.archive. ubuntu. com/ubuntu focal-proposed/main amd64 Packages dpkg/status us.archive. ubuntu. com/ubuntu focal-updates/main amd64 Packages us.archive. ubuntu. com/ubuntu focal/main amd64 Packages
| Installed: 3.192.30.9
| Candidate: 3.192.30.9
| Version table:
| *** 3.192.30.9 500
| 500 http://
| 100 /var/lib/
| 3.192.30.8 500
| 500 http://
| 3.192.30 500
| 500 http://