diff --git a/dom0/qvm-tools/qvm-dom0-upgrade b/dom0/qvm-tools/qvm-dom0-upgrade index 1fdb8e58..6cd40254 100755 --- a/dom0/qvm-tools/qvm-dom0-upgrade +++ b/dom0/qvm-tools/qvm-dom0-upgrade @@ -1,12 +1,5 @@ #!/bin/bash -ID=$(id -ur) - -if [ $ID != 0 ] ; then - echo "This script should be run as root, use sudo. " - exit 1 -fi - UPDATEVM=`qvm-get-updatevm` if [ -z "$UPDATEVM" ]; then @@ -27,6 +20,14 @@ qvm-run --pass_io $UPDATEVM "/usr/lib/qubes/qubes_download_dom0_updates.sh $*" | # Wait for download completed while pidof -x qubes-receive-updates >/dev/null; do sleep 0.5; done if [ $# -gt 0 ]; then + + 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 install (use sudo again)." + exit + fi + yum install $@ elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then yum check-update