mkdir /etc/pve 2>/dev/null || true
- if dpkg --compare-versions "$2" '<=' '5.1-47'; then
- # remove cron update job, superseded by systemd timer
- rm -f /etc/cron.d/pveupdate
-
- # remove old/unused init.d files
- OLD_INITD_FILES="pvebanner pvenetcommit pve-manager pvedaemon pveproxy pvestatd spiceproxy"
- for f in ${OLD_INITD_FILES}; do rm -f "/etc/init.d/$f"; done
- fi
-
if test ! -e /var/lib/pve-manager/apl-info/download.proxmox.com; then
mkdir -p /var/lib/pve-manager/apl-info
cp /usr/share/doc/pve-manager/aplinfo.dat /var/lib/pve-manager/apl-info/download.proxmox.com
done
fi
- if test -z "$2"; then
- : # no old version, nothing to do
- else
- # "$2" is the most recently configured version
- if dpkg --compare-versions "$2" '<=' '5.0-23'; then
- # 5.0-23 temporarily reverted the removal of the startcom CA in
- # ca-certificates; we've since switched to let's encrypt
- update-ca-certificates >/dev/null 2>&1
- fi
+ if test -n "$2"; then
+ # "$2" is the most recently configured version
+
+ if dpkg --compare-versions "$2" '<=' '5.0-23'; then
+ # 5.0-23 temporarily reverted the removal of the startcom CA in
+ # ca-certificates; we've since switched to let's encrypt
+ update-ca-certificates >/dev/null 2>&1
+ fi
+
+ if dpkg --compare-versions "$2" '<=' '5.1-47'; then
+ # remove cron update job, superseded by systemd timer
+ rm -f /etc/cron.d/pveupdate
+
+ # remove old/unused init.d files
+ OLD_INITD_FILES="pvebanner pvenetcommit pve-manager pvedaemon pveproxy pvestatd spiceproxy"
+ for f in ${OLD_INITD_FILES}; do rm -f "/etc/init.d/$f"; done
+ fi
fi
;;