diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:35:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:35:33 +0000 |
commit | 1f641814b2bfbbf2dc3347e11a3fe901bfdf1efc (patch) | |
tree | 77094b19bf9091ceb6f6ab7d0267f70fef9c8323 /debian/slapd.preinst | |
parent | Adding upstream version 2.5.13+dfsg. (diff) | |
download | openldap-1f641814b2bfbbf2dc3347e11a3fe901bfdf1efc.tar.xz openldap-1f641814b2bfbbf2dc3347e11a3fe901bfdf1efc.zip |
Adding debian version 2.5.13+dfsg-5.debian/2.5.13+dfsg-5debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/slapd.preinst')
-rwxr-xr-x | debian/slapd.preinst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/slapd.preinst b/debian/slapd.preinst new file mode 100755 index 0000000..888f04d --- /dev/null +++ b/debian/slapd.preinst @@ -0,0 +1,37 @@ +#! /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# + +# If we are upgrading from an old version then stop slapd and attempt to +# slapcat out the data so we can use it in postinst to do the upgrade. +# If slapd was removed and is being reinstalled, slapcat is not +# available at this time, so the data should have been dumped before the +# old slapd was removed. + +# dh_installinit currently does not stop the service in preinst (#989155) +if [ "$MODE" = upgrade ] && [ -x /etc/init.d/slapd ]; then + invoke-rc.d slapd stop || exit 1 +fi + +# Dump the config database before upgrading to 2.5. +# If the upgrade fails due to needing manual config changes, the LDIF +# export is the preferred format for making those changes. +if [ "$MODE" = upgrade ] && previous_version_older '2.5.5+dfsg-1~'; then + dump_config +fi + +if [ "$MODE" = upgrade ]; then + dump_databases +fi + +#DEBHELPER# + +exit 0 + +# vim: set sw=8 foldmethod=marker: |