dom0/qvm-dom0-update: replace gpk-update-viewer with yum update (#347)

This commit is contained in:
Marek Marczykowski 2011-09-12 15:04:27 +02:00
parent 9395ea239c
commit 2bbdb93594

View File

@ -40,9 +40,17 @@ if [ $# -gt 0 ]; then
yum install $@
elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then
# Above file exists only when at least one package was downloaded
yum check-update
if [ $? -eq 100 ]; then
gpk-update-viewer
ID=$(id -ur)
if [ $ID != 0 ] ; then
echo "This script should be run as root, use sudo next time."
echo "Now you can manually run yum update (use sudo again)."
exit
fi
yum update
fi
else
echo "No updates avaliable"