dom0: qvm-dom0-upgrade: fail when run as non-root user

This commit is contained in:
Joanna Rutkowska 2011-09-08 13:55:33 +02:00
parent f9fcd3393e
commit b2a3515f4f

View File

@ -1,5 +1,13 @@
#!/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
echo "UpdateVM not set, exiting"