From 34a28e35c991eed24cad5cc9e64c58164e9838e3 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Tue, 23 Jun 2020 20:14:38 -0400 Subject: [PATCH] upgrades: Append unattended-upgrades-dpkg.log for more detail Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- actions/upgrades | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/actions/upgrades b/actions/upgrades index d37297498..86c91f10a 100755 --- a/actions/upgrades +++ b/actions/upgrades @@ -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."""