In xenial and yakkety, unattended-upgrade can finish security updates after applying workaround 1&2.
workaround 3: If users reboot/shutdown by UI, there will be a pop-up window which asks users for root password.
If users reboot/shutdown by command (sudo reboot), unattended-upgrade will be killed and cannot finish security updates.
---
the code flow of unattended-upgrades:
(1) -> apt_pkg.get_lock() -> do_install() -> (2)
If users reboot/shutdown system in (1), unattended-upgrades-shutdown will break from monitoring loop and then there will no message to tell user that security update is ongoing.
In xenial and yakkety, unattended-upgrade can finish security updates after applying workaround 1&2.
workaround 3: If users reboot/shutdown by UI, there will be a pop-up window which asks users for root password.
If users reboot/shutdown by command (sudo reboot), unattended-upgrade will be killed and cannot finish security updates.
Workaround 1: system/ apt-daily. service /usr/lib/ apt/apt. systemd. daily
/lib/systemd/
[Service]
Type=oneshot
ExecStart=
+KillMode=none
+TimeoutStopSec=0
Wordaround 2: system/ apt-daily. service man:apt( 8) ncies=no shutdown. target
/lib/systemd/
[Unit]
Description=Daily apt activities
Documentation=
+DefaultDepende
+Before=
Workaround 3: system/ apt-daily. service /usr/lib/ apt/apt. systemd. daily /bin/systemd- inhibit --what=shutdown --mode=block /usr/lib/ apt/apt. systemd. daily
/lib/systemd/
[Service]
Type=oneshot
-ExecStart=
+ExecStart=
--- upgrades:
the code flow of unattended-
(1) -> apt_pkg.get_lock() -> do_install() -> (2)
If users reboot/shutdown system in (1), unattended- upgrades- shutdown will break from monitoring loop and then there will no message to tell user that security update is ongoing.