config: rename external-snapshots to snapshot-as-volume-chain

Not perfect but now it's still easy to rename and the new variant fits
a bit better to the actual design and implementation.

Add best-effort migration for storage.cfg, this has been never
publicly released after all.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2025-07-17 19:46:13 +02:00
parent 2d44f2eb3e
commit a81ee83127
7 changed files with 36 additions and 22 deletions

11
debian/postinst vendored
View File

@ -31,6 +31,17 @@ case "$1" in
fi
done
fi
# TODO: Can be dropped with some 9.x stable release, this was never in a publicly available
# package, so only for convenience for internal testing setups.
if dpkg --compare-versions "$2" 'lt' '9.0.5'; then
if grep -Pq '^\texternal-snapshots ' /etc/pve/storage.cfg; then
echo "Replacing old 'external-snapshots' with 'snapshot-as-volume-chain' in /etc/pve/storage.cfg"
sed -i 's/^\texternal-snapshots /\tsnapshot-as-volume-chain /' /etc/pve/storage.cfg || \
echo "Failed to replace old 'external-snapshots' with 'snapshot-as-volume-chain' in /etc/pve/storage.cfg"
fi
fi
fi
;;