vm: allow clean yum cache for dom0 updates (#346)
This commit is contained in:
parent
e8d84ced0a
commit
d57804b6a0
@ -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 ' '`
|
||||
|
Loading…
Reference in New Issue
Block a user