Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 857405 Details for
Bug 900943
net-nds/openldap: init script modernization
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
slapd.initd
slapd.initd (text/plain), 1.48 KB, created by
Tomáš Mózes
on 2023-03-12 20:28:08 UTC
(
hide
)
Description:
slapd.initd
Filename:
MIME Type:
Creator:
Tomáš Mózes
Created:
2023-03-12 20:28:08 UTC
Size:
1.48 KB
patch
obsolete
>#!/sbin/openrc-run ># Copyright 1999-2023 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 > >: ${OPENLDAP_CONFIG:=/etc/openldap/slapd.conf} >: ${OPENLDAP_USER:=ldap} >: ${OPENLDAP_GROUP:=ldap} > >command="/usr/lib64/openldap/slapd" >command_args="-u ${OPENLDAP_USER} -g ${OPENLDAP_GROUP} ${OPTS}" >extra_commands="checkconfig" >pidfile="/run/${RC_SVCNAME}.pid" > >depend() { > need net > before dbus hald > provide ldap >} > >start_pre() { > if ! checkconfig -Q ; then > eerror "There is a problem with your slapd.conf!" > return 1 > fi > > [[ -n "${KRB5_KTNAME}" ]] && export KRB5_KTNAME > > return 0 >} > >checkconfig() { > # checks requested by bug #502948 > # Step 1: extract the last valid config file or config dir > set -- ${OPTS} > while [[ -n "$*" ]]; do > opt=${1} ; shift > if [[ "${opt}" = "-f" ]] || [[ "${opt}" = "-F" ]]; then > CONF=${1} > shift > fi > done > set -- > > # Fallback > CONF=${CONF-${OPENLDAP_CONFIG}} > [[ -d ${CONF} ]] && CONF=${CONF}/* > DBDIRS=$(eval awk '"/^(directory|olcDbDirectory:)/{print \$2}"' ${CONF}) > for d in ${DBDIRS}; do > if [[ ! -d ${d} ]]; then > eerror "Directory ${d} in config does not exist!" > return 1 > fi > /usr/bin/find ${d} ! -name DB_CONFIG ! -user ${OPENLDAP_USER} -o ! -group ${OPENLDAP_GROUP} | grep -sq . > if [[ $? -ne 0 ]]; then > ewarn "You have files in ${d} not owned by the ${OPENLDAP_USER} user, you must ensure they are accessible to the slapd instance!" > fi > done > > # now test the config fully > /usr/sbin/slaptest -u "$@" ${OPTS_CONF} >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 900943
: 857405