Do not error when qvm-get-default-netvm returns empty string.

It happens when installing qubes-core-dom0 for the first time.
This commit is contained in:
Rafal Wojtczuk 2010-10-06 10:55:32 +02:00
parent 17f6bb8ede
commit 7c1babe8aa
2 changed files with 5 additions and 2 deletions

View File

@ -46,6 +46,9 @@ stop()
{
echo -n $"Shutting down all Qubes VMs:"
NETVM=$(qvm-get-default-netvm)
if [ "X"$NETVM = "X" ] ; then
NETVM="dom0"
fi
qvm-run -q --shutdown --all --wait --exclude $NETVM
rm -f /var/lock/subsys/qubes_core
killall meminfo-writer

View File

@ -175,7 +175,7 @@ done
/etc/init.d/qubes_core start
NETVM=$(qvm-get-default-netvm)
if [ $NETVM = "dom0" ] ; then
if [ "X"$NETVM = "X""dom0" ] ; then
/etc/init.d/qubes_netvm start
fi
@ -191,7 +191,7 @@ fi
if [ "$1" -gt 1 ] ; then
# upgrading already installed package...
NETVM=$(qvm-get-default-netvm)
if [ $NETVM = "dom0" ] ; then
if [ "X"$NETVM = "X""dom0" ] ; then
/etc/init.d/qubes_netvm stop
fi