From 914bab048a7f806859199b68ebef97e6283bf432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 12 Nov 2015 00:36:43 +0100 Subject: [PATCH] Explicitly fail upgrades-installed-check on other distributions QubesOS/qubes-issues#1066 --- misc/upgrades-installed-check | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/upgrades-installed-check b/misc/upgrades-installed-check index c392976..443ffdd 100755 --- a/misc/upgrades-installed-check +++ b/misc/upgrades-installed-check @@ -13,13 +13,16 @@ if [ -e /etc/system-release ]; then exit_code="$?" [ "$exit_code" -eq 100 ] && echo "false" && exit 0 [ "$exit_code" -eq 0 ] && echo "true" -else +elif [ -e /etc/debian_version ]; then ## Debian set -e set -o pipefail apt_get_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" +else + echo "Check not implemented for this distribution" >&2 + exit 1 fi exit "$exit_code"