core-admin/dom0/qvm-tools/qvm-dom0-upgrade
2011-07-17 01:20:13 +02:00

22 lines
533 B
Bash
Executable File

#!/bin/bash
UPDATEVM=`qvm-get-updatevm`
if [ -z "$UPDATEVM" ]; then
echo "UpdateVM not set, exiting"
exit 1
fi
echo "Checking for dom0 updates"
# Start VM if not running already
qvm-run -a $UPDATEVM true || exit 1
/usr/lib/qubes/sync_rpmdb_updatevm.sh || exit 1
qvm-run --pass_io $UPDATEVM "/usr/lib/qubes/qubes_download_dom0_updates.sh $*" || exit 1
# Wait for download completed
while pidof -x qubes-receive-updates >/dev/null; do sleep 0.5; done
yum check-update
if [ $? -ne 100 ]; then
exit 0
fi
gpk-update-viewer