diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 11:11:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 11:11:40 +0000 |
commit | 2886df93860f983d875b7d6acb418faa31491d5a (patch) | |
tree | b596ddcbb70247c1994f3b1d8ba9e793b9788a9d /debian/slapd.prerm | |
parent | Adding upstream version 2.4.57+dfsg. (diff) | |
download | openldap-2886df93860f983d875b7d6acb418faa31491d5a.tar.xz openldap-2886df93860f983d875b7d6acb418faa31491d5a.zip |
Adding debian version 2.4.57+dfsg-3+deb11u1.debian/2.4.57+dfsg-3+deb11u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/slapd.prerm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/slapd.prerm b/debian/slapd.prerm new file mode 100755 index 0000000..ce7d281 --- /dev/null +++ b/debian/slapd.prerm @@ -0,0 +1,34 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# This will be replaced with debian/slapd.scripts-common which includes +# various helper functions and $OLD_VERSION and $SLAPD_CONF +#SCRIPTSCOMMON# + +#DEBHELPER# + +# Dump config and data to LDIF before removing slapd. +# If a later version is reinstalled without being purged first, the LDIF +# files may be required for the upgrade, and the old slapcat won't be +# available any more. +# During an upgrade, the new preinst will be in a better position to +# control whether dumping is needed. + +# If the config is badly broken, slapcat may fail, but this should not +# prevent the package from being removed or purged. +set +e + +if [ "$MODE" = remove ]; then + # scripts-common sets OLD_VERSION incorrectly for remove + OLD_VERSION="$(dpkg-query -W -f '${Version}' slapd)" + + dump_config + dump_databases +fi + +exit 0 + +# vim: set foldmethod=marker: |