Debian Codegraph @

debian/slapd.preinst

raw
1 #! /bin/sh
2
3 set -e
4
5 . /usr/share/debconf/confmodule
6
7 # This will be replaced with debian/slapd.scripts-common which includes
8 # various helper functions and $OLD_VERSION and $SLAPD_CONF
9 #SCRIPTSCOMMON#
10
11 # If we are upgrading from an old version then stop slapd and attempt to
12 # slapcat out the data so we can use it in postinst to do the upgrade.
13 # If slapd was removed and is being reinstalled, slapcat is not
14 # available at this time, so the data should have been dumped before the
15 # old slapd was removed.
16
17 # Dump the config database before transitioning to OpenSSL.
18 # If the upgrade fails due to needing manual config changes, the LDIF
19 # export is the preferred format for making those changes.
20 if [ "$MODE" = upgrade ] && previous_version_older '2.6.9+dfsg-1~'; then
21 dump_config
22 fi
23
24 if [ "$MODE" = upgrade ]; then
25 dump_databases
26 fi
27
28 #DEBHELPER#
29
30 exit 0
31
32 # vim: set sw=8 foldmethod=marker: