diff --git a/common/qubes_download_dom0_updates.sh b/common/qubes_download_dom0_updates.sh index e56d3ac..c30e5bf 100755 --- a/common/qubes_download_dom0_updates.sh +++ b/common/qubes_download_dom0_updates.sh @@ -4,6 +4,7 @@ DOM0_UPDATES_DIR=/var/lib/qubes/dom0-updates DOIT=0 GUI=1 +CLEAN=0 OPTS="--installroot $DOM0_UPDATES_DIR" PKGLIST= while [ -n "$1" ]; do @@ -14,6 +15,9 @@ while [ -n "$1" ]; do --nogui) GUI=0 ;; + --clean) + CLEAN=1 + ;; -*) OPTS="$OPTS $1" ;; @@ -32,6 +36,10 @@ fi mkdir -p $DOM0_UPDATES_DIR/etc cp /etc/yum.conf $DOM0_UPDATES_DIR/etc/ +if [ "x$CLEAN" = "1" ]; then + yum $OPTS clean all +fi + if [ "x$PKGLIST" = "x" ]; then echo "Checking for dom0 updates..." PKGLIST=`yum $OPTS check-update -q | cut -f 1 -d ' '`