show error msg if qubes.ReceiveUpdates failed

This commit is contained in:
Patrick Schleizer 2015-09-03 14:56:29 +00:00
parent e924758c54
commit fc013bd480

View File

@ -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