Explorar o código

Fix updates checking on Fedora with dnf

yum wrapper may not be installed anymore

QubesOS/qubes-issues#2009
Marek Marczykowski-Górecki %!s(int64=5) %!d(string=hai) anos
pai
achega
bb28efe628
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      misc/upgrades-installed-check

+ 6 - 1
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"