From bb28efe62868ac814bdc3b2320a4375a651fb700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 5 Dec 2018 05:48:00 +0100 Subject: [PATCH] Fix updates checking on Fedora with dnf yum wrapper may not be installed anymore QubesOS/qubes-issues#2009 --- misc/upgrades-installed-check | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/upgrades-installed-check b/misc/upgrades-installed-check index 274421b..24714ca 100755 --- a/misc/upgrades-installed-check +++ b/misc/upgrades-installed-check @@ -9,8 +9,13 @@ if [ -e /etc/system-release ]; then ## Fedora + if command -v dnf >/dev/null; then + yum=dnf + else + yum=yum + fi # shellcheck disable=SC2034 - yum_output="$(yum -q check-update 2>&1)" + yum_output="$($yum -q check-update 2>&1)" exit_code="$?" [ "$exit_code" -eq 100 ] && echo "false" && exit 0 [ "$exit_code" -eq 0 ] && echo "true"