From 59ecf8eb83073e91febfbe1badd4b5d4a58d7f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 18 Feb 2019 05:05:24 +0100 Subject: [PATCH] dom0-update: fix backup template name calculation VM name is limited to 31 chars, not 32. Fixes QubesOS/qubes-issues#4829 --- 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 aa05596..33f3303 100755 --- a/dom0-updates/qubes-dom0-update +++ b/dom0-updates/qubes-dom0-update @@ -84,7 +84,7 @@ if [ "$YUM_ACTION" == "reinstall" ] || [ "$YUM_ACTION" == "upgrade" ] || [ "$YUM UPDATEVM_TEMPLATE=$(qvm-prefs -- "$UPDATEVM" template 2>/dev/null) if [ X"$UPDATEVM_TEMPLATE" = X"$TEMPLATE" ]; then TEMPLATE_BACKUP="${TEMPLATE}-backup-$(date +%Y%m%d)-$(mktemp -u XXXX)" - TEMPLATE_BACKUP=${TEMPLATE_BACKUP:0:32} + TEMPLATE_BACKUP=${TEMPLATE_BACKUP:0:31} echo "Attempting to operate on template of UpdateVM... backing up $TEMPLATE to $TEMPLATE_BACKUP" if ! qvm-clone -- "$TEMPLATE" "$TEMPLATE_BACKUP"; then echo "ERROR: Unable to make backup of UpdateVM template!" >&2