mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
upgrades: Append unattended-upgrades-dpkg.log for more detail
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
0c59dbb0e4
commit
34a28e35c9
@ -15,6 +15,7 @@ from plinth.modules.apache.components import check_url
|
||||
|
||||
AUTO_CONF_FILE = '/etc/apt/apt.conf.d/20auto-upgrades'
|
||||
LOG_FILE = '/var/log/unattended-upgrades/unattended-upgrades.log'
|
||||
DPKG_LOG_FILE = '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
|
||||
BUSTER_BACKPORTS_RELEASE_FILE_URL = \
|
||||
'https://deb.debian.org/debian/dists/buster-backports/Release'
|
||||
|
||||
@ -132,11 +133,19 @@ def subcommand_disable_auto(_):
|
||||
def subcommand_get_log(_):
|
||||
"""Print the automatic upgrades log."""
|
||||
try:
|
||||
print('==> ' + os.path.basename(LOG_FILE))
|
||||
with open(LOG_FILE, 'r') as file_handle:
|
||||
print(file_handle.read())
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
try:
|
||||
print('==> ' + os.path.basename(DPKG_LOG_FILE))
|
||||
with open(DPKG_LOG_FILE, 'r') as file_handle:
|
||||
print(file_handle.read())
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
|
||||
def _get_protocol():
|
||||
"""Return the protocol to use for newly added repository sources."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user