Ubuntu’s unattended-upgrades commands and package features may not work as expected when using an Exacq Ubuntu image on ExacqVision hardware. By default on Ubuntu Exacq images, unattended-upgrades package features are purposely disabled from running due to the potential of losing video – and how the use of this feature cannot guarantee uptime of the ExacqVision Server software host.
This unattended-upgrades package is usually intended to install security updates automatically, by default, so that machines that are not proactively maintained do not become a liability.
For more information regarding ExacqVision’s stance on updating or upgrading operating systems on ExacqVision NVRs please see:
https://support.exacq.com/#/knowledge-base/article/5144
Product
- ExacqVision Server Hardware
- ExacqVision Server Software
Ubuntu Operating Systems only.
Step to Reproduce
Schedule unattended-upgrades package features as listed by Ubuntu documentation.
See: https://ubuntu.com/blog/3-ways-to-apply-security-patches-in-linux
Notes:
The unattended-upgrades package is over a decade old, and is enabled by default on all currently supported versions of Ubuntu offered directly from Ubuntu. The ExacqVision image is configured differently, with this disabled as to prevent loss of video.
Expected Results
Unattended-upgrades package features should work as expected when scheduled.
Actual Results
Unattended-upgrades package features fail without dialogue.
Solution
1) Run the terminal commands below:
sudo apt-get -y install unattended-upgrades
sudo apt-get install apt-listchanges
sudo dpkg-reconfigure –priority=low unattended-upgrades
2) Create and/or edit the file at /etc/apt/apt.conf.d/10periodic and /etc/apt/apt.conf.d/20auto-upgrades with the following:
APT::Periodic::Enable “1”;
APT::Periodic::Update-Package-Lists “1”;
APT::Periodic::Download-Upgradeable-Packages “1”;
APT::Periodic::AutocleanInterval “1”;
APT::Periodic::Unattended-Upgrade “1”;
3) Run the following terminal commands:
systemctl unmask apt-daily.service
systemctl unmask apt-daily-upgrade.service
systemctl enable apt-daily.service
systemctl enable apt-daily-upgrade.service
4) sudo systemctl edit apt-daily-upgrade.service
Edit and Comment out “ExceStartPre=” line,
repeat this action for:
sudo systemctl edit apt-daily-upgrade.service
5) Run the following terminal command:
sudo systemctl daemon-reload
6) Run all of the following terminal commands in order listed:
systemctl enable apt-daily.timer
systemctl enable apt-daily-upgrade.timer
systemctl start apt-daily.timer
systemctl start apt-daily-upgrade.timer
systemctl start apt-daily.service
systemctl start apt-daily-upgrade.service
7) systemctl list-timers to see if the timers are active and when they run next
8) tail -n 100 /var/log/unattended-upgrades/unattended-upgrades.log to see if it ran at the time start service was ran
<br>