From 83da7a0ac93decce70c1a02b0739020d8e2b69fd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 19:54:14 +0200 Subject: Adding debian version 2.6.7+dfsg-1~exp1. Signed-off-by: Daniel Baumann --- debian/slapd.preinst | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 debian/slapd.preinst (limited to 'debian/slapd.preinst') 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: -- cgit v1.2.3