vm: dom0 updates - minor cleanup

This commit is contained in:
Marek Marczykowski 2011-09-12 14:34:41 +02:00
parent 8c6e03588a
commit e8d84ced0a

View File

@ -4,7 +4,7 @@ DOM0_UPDATES_DIR=/var/lib/qubes/dom0-updates
DOIT=0 DOIT=0
GUI=1 GUI=1
OPTS= OPTS="--installroot $DOM0_UPDATES_DIR"
PKGLIST= PKGLIST=
while [ -n "$1" ]; do while [ -n "$1" ]; do
case "$1" in case "$1" in
@ -34,7 +34,7 @@ cp /etc/yum.conf $DOM0_UPDATES_DIR/etc/
if [ "x$PKGLIST" = "x" ]; then if [ "x$PKGLIST" = "x" ]; then
echo "Checking for dom0 updates..." echo "Checking for dom0 updates..."
PKGLIST=`yum --installroot $DOM0_UPDATES_DIR $OPTS check-update -q | cut -f 1 -d ' '` PKGLIST=`yum $OPTS check-update -q | cut -f 1 -d ' '`
else else
PKGS_FROM_CMDLINE=1 PKGS_FROM_CMDLINE=1
fi fi
@ -61,11 +61,11 @@ set -e
if [ "$GUI" = 1 ]; then if [ "$GUI" = 1 ]; then
( echo "1" ( echo "1"
yumdownloader --destdir "$DOM0_UPDATES_DIR/packages" --installroot "$DOM0_UPDATES_DIR" $OPTS $PKGLIST yumdownloader --destdir "$DOM0_UPDATES_DIR/packages" $OPTS $PKGLIST
echo 100 ) | zenity --progress --pulsate --auto-close --auto-kill \ echo 100 ) | zenity --progress --pulsate --auto-close --auto-kill \
--text="Downloading updates for Dom0, please wait..." --title="Qubes Dom0 updates" --text="Downloading updates for Dom0, please wait..." --title="Qubes Dom0 updates"
else else
yumdownloader --destdir "$DOM0_UPDATES_DIR/packages" --installroot "$DOM0_UPDATES_DIR" $OPTS $PKGLIST yumdownloader --destdir "$DOM0_UPDATES_DIR/packages" $OPTS $PKGLIST
fi fi
if ls $DOM0_UPDATES_DIR/packages/*.rpm > /dev/null 2>&1; then if ls $DOM0_UPDATES_DIR/packages/*.rpm > /dev/null 2>&1; then