From facf84a4e66c1b0bb6b0614ff7c0ea55d5a07551 Mon Sep 17 00:00:00 2001 From: donoban Date: Fri, 23 Feb 2018 10:31:12 +0100 Subject: [PATCH 1/2] Make dir dom0-updates if not exists on UpdateVM --- dom0-updates/qubes-dom0-update | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dom0-updates/qubes-dom0-update b/dom0-updates/qubes-dom0-update index 0573da8..ccbd084 100755 --- a/dom0-updates/qubes-dom0-update +++ b/dom0-updates/qubes-dom0-update @@ -163,6 +163,8 @@ echo "Using $UPDATEVM as UpdateVM to download updates for Dom0; this may take so # Start VM if not running already qvm-run $QVMRUN_OPTS -a $UPDATEVM true || exit 1 +qvm-run -u root $UPDATEVM 'mkdir -m 775 /var/lib/qubes/dom0-updates/' || exit 1 +qvm-run -u root $UPDATEVM 'chown user:user /var/lib/qubes/dom0-updates/' || exit 1 qvm-run $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 | \ qvm-run -p "$UPDATEVM" 'LC_MESSAGES=C tar x -C /var/lib/qubes/dom0-updates 2>&1 | grep -v -E "s in the future"' From e2ff40c188541f346d1010c55129552707c162be Mon Sep 17 00:00:00 2001 From: donoban Date: Sun, 25 Feb 2018 12:12:06 +0100 Subject: [PATCH 2/2] Added -p to mkdir for skip error if dir exists --- dom0-updates/qubes-dom0-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom0-updates/qubes-dom0-update b/dom0-updates/qubes-dom0-update index ccbd084..d947c06 100755 --- a/dom0-updates/qubes-dom0-update +++ b/dom0-updates/qubes-dom0-update @@ -163,7 +163,7 @@ echo "Using $UPDATEVM as UpdateVM to download updates for Dom0; this may take so # Start VM if not running already qvm-run $QVMRUN_OPTS -a $UPDATEVM true || exit 1 -qvm-run -u root $UPDATEVM 'mkdir -m 775 /var/lib/qubes/dom0-updates/' || exit 1 +qvm-run -u root $UPDATEVM 'mkdir -m 775 -p /var/lib/qubes/dom0-updates/' || exit 1 qvm-run -u root $UPDATEVM 'chown user:user /var/lib/qubes/dom0-updates/' || exit 1 qvm-run $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 | \