pre_upgrade() { if (( $(vercmp $2 20210603) < 0 )); then local olddir=/etc/ca-certificates/trust-source/blacklist local newdir=/etc/ca-certificates/trust-source/blocklist cat < $olddir has been renamed to $newdir MSG if [[ ! -e $olddir ]]; then : # Do nothing elif [[ -e $newdir ]]; then cat < WARNING: $newdir already exists. You must migrate your blocked certificates manually. MSG else mv -Tn $olddir $newdir fi fi } # vim:set ts=2 sw=2 et: