Merge remote-tracking branch 'origin/pr/25'

* origin/pr/25:
  show error msg if qubes.ReceiveUpdates failed
This commit is contained in:
Marek Marczykowski-Górecki 2015-09-28 12:09:54 +02:00
commit b10f0cf905
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

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