exec&>/dev/null
if[$1-gt1]
then
if[!-d/usr/lib/pgsql/backup];then
mkdir-p/usr/lib/pgsql/backup
fi
cd/usr/bin
cp-fppostmasterpostgres/usr/lib/pgsql/backup
fi
echo"########################################################################"echo" Attention!"echo" For PostgreSQL 15.6 and old need to run the file"echo" /usr/share/pgsql/fix-CVE-2024-4317.sql for all databases in an existing"echo" cluster."
/usr/sbin/preun_servicepostgresql
# $2, holds the number of instances of the target package that will remain# after the operation if $2 is 0, the target package will be removed