From fc013bd480176034990a6091f8c40dbafd9364ca Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Thu, 3 Sep 2015 14:56:29 +0000 Subject: [PATCH] show error msg if qubes.ReceiveUpdates failed --- misc/qubes-download-dom0-updates.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/qubes-download-dom0-updates.sh b/misc/qubes-download-dom0-updates.sh index 029c2ce..46f7cb9 100755 --- a/misc/qubes-download-dom0-updates.sh +++ b/misc/qubes-download-dom0-updates.sh @@ -129,7 +129,13 @@ else fi if ls $DOM0_UPDATES_DIR/packages/*.rpm > /dev/null 2>&1; then - /usr/lib/qubes/qrexec-client-vm dom0 qubes.ReceiveUpdates /usr/lib/qubes/qfile-agent $DOM0_UPDATES_DIR/packages/*.rpm + cmd="/usr/lib/qubes/qrexec-client-vm dom0 qubes.ReceiveUpdates /usr/lib/qubes/qfile-agent" + qrexec_exit_code=0 + $cmd $DOM0_UPDATES_DIR/packages/*.rpm || { qrexec_exit_code=$? ; true; }; + if [ ! "$qrexec_exit_code" = "0" ]; then + echo "'$cmd $DOM0_UPDATES_DIR/packages/*.rpm' failed with exit code ${qrexec_exit_code}!" >&2 + exit $qrexec_exit_code + fi else echo "No packages downloaded" fi