diff --git a/misc/upgrades-installed-check b/misc/upgrades-installed-check index 443ffdd..e4eabe2 100755 --- a/misc/upgrades-installed-check +++ b/misc/upgrades-installed-check @@ -17,9 +17,10 @@ elif [ -e /etc/debian_version ]; then ## Debian set -e set -o pipefail - apt_get_output="$(LANG="C" apt-get -s upgrade 2>&1)" + apt_get_update_output="$(apt-get -q update 2>&1)" + apt_get_upgrade_output="$(LANG="C" apt-get -s upgrade 2>&1)" exit_code="$?" - echo "$apt_get_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false" + echo "$apt_get_upgrade_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false" else echo "Check not implemented for this distribution" >&2 exit 1 diff --git a/vm-systemd/qubes-update-check.service b/vm-systemd/qubes-update-check.service index c3fbe21..afdb29e 100644 --- a/vm-systemd/qubes-update-check.service +++ b/vm-systemd/qubes-update-check.service @@ -5,5 +5,4 @@ After=qubes-qrexec-agent.service [Service] Type=oneshot -ExecStart=/bin/sh -c 'if [ -e /etc/debian_version ]; then apt-get -q update; fi' ExecStart=/usr/lib/qubes/upgrades-status-notify