Verified 1.1ubuntu1.18.04.7~16.04.2 on Xenial:
root@x-uu-verify:~# on_ac_power ; echo $? 1 root@x-uu-verify:~# unattended-upgrade --dry-run --verbose Initial blacklisted packages: ebtables Initial whitelisted packages: Starting unattended upgrades script Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESM,a=xenial System is on battery power, stopping root@x-uu-verify:~# on_ac_power ; echo $? 0 root@x-uu-verify:~# unattended-upgrade --dry-run --verbose Initial blacklisted packages: ebtables Initial whitelisted packages: Starting unattended upgrades script Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESM,a=xenial No packages found that can be upgraded unattended and no pending auto-removals root@x-uu-verify:~# echo ' Unattended-Upgrade::OnlyOnACPower "false";' | tee /etc/apt/apt.conf.d/51unattended-upgrades-on-battery Unattended-Upgrade::OnlyOnACPower "false"; root@x-uu-verify:~# on_ac_power ; echo $? 1 root@x-uu-verify:~# unattended-upgrade --dry-run --verbose Initial blacklisted packages: ebtables Initial whitelisted packages: Starting unattended upgrades script Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESM,a=xenial No packages found that can be upgraded unattended and no pending auto-removals root@x-uu-verify:~# dpkg -l unattended-upgrades | cat Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-===================-==========================-============-=========================================== ii unattended-upgrades 1.1ubuntu1.18.04.7~16.04.2 all automatic installation of security upgrades
Verified 1.1ubuntu1. 18.04.7~ 16.04.2 on Xenial:
root@x-uu-verify:~# on_ac_power ; echo $? a=xenial- security, o=UbuntuESM, a=xenial a=xenial- security, o=UbuntuESM, a=xenial Upgrade: :OnlyOnACPower "false";' | tee /etc/apt/ apt.conf. d/51unattended- upgrades- on-battery Upgrade: :OnlyOnACPower "false"; a=xenial- security, o=UbuntuESM, a=xenial Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ======= ==-==== ======= ======= ======= =-===== ======= -====== ======= ======= ======= ======= ======= == 18.04.7~ 16.04.2 all automatic installation of security upgrades
1
root@x-uu-verify:~# unattended-upgrade --dry-run --verbose
Initial blacklisted packages: ebtables
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,
System is on battery power, stopping
root@x-uu-verify:~# on_ac_power ; echo $?
0
root@x-uu-verify:~# unattended-upgrade --dry-run --verbose
Initial blacklisted packages: ebtables
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,
No packages found that can be upgraded unattended and no pending auto-removals
root@x-uu-verify:~# echo ' Unattended-
Unattended-
root@x-uu-verify:~# on_ac_power ; echo $?
1
root@x-uu-verify:~# unattended-upgrade --dry-run --verbose
Initial blacklisted packages: ebtables
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,
No packages found that can be upgraded unattended and no pending auto-removals
root@x-uu-verify:~# dpkg -l unattended-upgrades | cat
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii unattended-upgrades 1.1ubuntu1.