jobcore/ca-certificates/ca-certificates-utils.install

24 lines
521 B
Text
Raw Normal View History

2022-03-20 13:19:37 +01:00
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 <<MSG
> $olddir has been renamed to
$newdir
MSG
if [[ ! -e $olddir ]]; then
: # Do nothing
elif [[ -e $newdir ]]; then
cat <<MSG
> 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: