Bug#411413: [Pkg-openldap-devel] Bug#411413: slapd: Permit the use of the new configuration scheme

Daniel 'NebuchadnezzaR' Dehennin nebuchadnezzar at asgardr.info
Mon Feb 19 04:52:43 UTC 2007


Le 4918 Septembre 1993, Steve Langasek a tapoté:
> What exactly are you asking for with this bug report?  If you're asking for
> this to be enabled by default, then I don't think that's going to happen any
> time soon.

Ok, but is it possible to add a SLAPD_D variable in /etc/default/slapd
and a test in the initscript ?

Somthing like:

if [ -n "$SLAPD_D" ] && [ -d "$SLAPD_D" ]; then
    SLAPD_OPTIONS="-F $SLAPD_D $SLAPD_OPTIONS"
fi

Everyone can choose to convert the slapd.conf file in the new slapd.d,
set SLAPD_D accordingly and just restart the slapd daemon.

Using -f and -F at the same time convert the slapd.conf file to the
slapd.d structure, so using both at the same time can override settings.

Using one must exclude the other.

What do you think about:

if [ -n "$SLAPD_D" ] && [ -d "$SLAPD_D" ]; then
    SLAPD_OPTIONS="-F $SLAPD_D $SLAPD_OPTIONS"

elif [ -z "$SLAPD_CONF" ]; then
    SLAPD_CONF=/etc/ldap/slapd.conf
    SLAPD_D=/etc/ldap/slapd.d

else
    SLAPD_OPTIONS="-f $SLAPD_CONF $SLAPD_OPTIONS"
fi

if [ ! -r "$SLAPD_CONF" ] && [ ! -d "$SLAPD_D"]; then
  cat <<EOF >&2
No configuration file was found for slapd at $SLAPD_CONF and $SLAPD_D.
If you have moved the slapd configuration file please modify
/etc/default/slapd to reflect this.  If you chose to not
configure slapd during installation then you need to do so
prior to attempting to start slapd.
An example slapd.conf is in /usr/share/slapd
EOF
  exit 0 # Should this be 1?
fi


Maybe modifying the message to reflect the possibility of using the
new slapd.d ?

Regards.
-- 
Daniel 'NebuchadnezzaR' Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x2A408F69




More information about the Pkg-openldap-devel mailing list