Make dir dom0-updates if not exists on UpdateVM

https://github.com/QubesOS/qubes-issues/issues/3620
This commit is contained in:
donoban 2018-02-23 10:48:06 +01:00
parent d48f5599d3
commit 994bd72363
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -166,6 +166,8 @@ rm -f /var/lib/qubes/updates/errors
echo "Using $UPDATEVM as UpdateVM to download updates for Dom0; this may take some time..." >&2 echo "Using $UPDATEVM as UpdateVM to download updates for Dom0; this may take some time..." >&2
# qvm-run by default auto-starts the VM if not running # qvm-run by default auto-starts the VM if not running
qvm-run --nogui -q -u root $UPDATEVM 'mkdir -m 775 /var/lib/qubes/dom0-updates/' || exit 1
qvm-run --nogui -q -u root $UPDATEVM 'chown user:user /var/lib/qubes/dom0-updates/' || exit 1
qvm-run --nogui -q $UPDATEVM 'rm -rf /var/lib/qubes/dom0-updates/etc' || exit 1 qvm-run --nogui -q $UPDATEVM 'rm -rf /var/lib/qubes/dom0-updates/etc' || exit 1
tar c /var/lib/rpm /etc/yum.repos.d /etc/yum.conf 2>/dev/null | \ tar c /var/lib/rpm /etc/yum.repos.d /etc/yum.conf 2>/dev/null | \
qvm-run --nogui --pass-io "$UPDATEVM" 'LC_MESSAGES=C tar x -C /var/lib/qubes/dom0-updates 2>&1 | grep -v -E "s in the future"' qvm-run --nogui --pass-io "$UPDATEVM" 'LC_MESSAGES=C tar x -C /var/lib/qubes/dom0-updates 2>&1 | grep -v -E "s in the future"'