mirror of
https://github.com/jiangcuo/pve-storage.git
synced 2025-08-24 22:19:01 +00:00

As this cannot trigger due to no direct upgrade path existing between PVE 7 and PVE 9, we only support single major version upgrades at a time. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
28 lines
832 B
Bash
28 lines
832 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
#DEBHELPER#
|
|
|
|
case "$1" in
|
|
configure)
|
|
|
|
if test -n "$2"; then # got old version so this is an update
|
|
|
|
# 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
|
|
;;
|
|
|
|
esac
|
|
|
|
exit 0
|