rpms/openldap/devel ldap.init,1.28,1.29 openldap.spec,1.112,1.113
Jan Šafránek (jsafrane)
fedora-extras-commits at redhat.com
Mon Jan 28 11:46:21 UTC 2008
- Previous message (by thread): rpms/ftp/F-8 netkit-ftp-0.17-bitrate.patch, NONE, 1.1 ftp.spec, 1.41, 1.42
- Next message (by thread): rpms/ardour/F-8 .cvsignore, 1.3, 1.4 ardour.spec, 1.8, 1.9 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jsafrane
Update of /cvs/pkgs/rpms/openldap/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30644
Modified Files:
ldap.init openldap.spec
Log Message:
init script made LSB-compliant
Resolves: #247012
Index: ldap.init
===================================================================
RCS file: /cvs/pkgs/rpms/openldap/devel/ldap.init,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ldap.init 14 Jan 2008 10:10:51 -0000 1.28
+++ ldap.init 28 Jan 2008 11:45:46 -0000 1.29
@@ -10,15 +10,22 @@
# config: /etc/openldap/slapd.conf
# pidfile: /var/run/openldap/slapd.pid
+### BEGIN INIT INFO
+# Provides: ldap
+# Required-Start: $network $local_fs
+# Required-Stop: $network $local_fs
+# Should-Start:
+# Should-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: starts and stopd OpenLDAP server daemon
+# Description: LDAP stands for Lightweight Directory Access Protocol, used
+# for implementing the industry standard directory services.
+### END INIT INFO
+
# Source function library.
. /etc/init.d/functions
-# Source networking configuration and check that networking is up.
-if [ -r /etc/sysconfig/network ] ; then
- . /etc/sysconfig/network
- [ ${NETWORKING} = "no" ] && exit 1
-fi
-
# Define default values of options allowed in /etc/sysconfig/ldap
SLAPD_LDAP="yes"
SLAPD_LDAPI="no"
@@ -32,7 +39,8 @@
slapd=/usr/sbin/slapd
slaptest=/usr/sbin/slaptest
-[ -x ${slapd} ] || exit 1
+lockfile=/var/lock/subsys/ldap
+configfile=/etc/openldap/slapd.conf
RETVAL=0
@@ -92,13 +100,14 @@
function configtest() {
local user= ldapuid= dbdir= file=
+ [ -f $configfile ] || exit 6
# Check for simple-but-common errors.
user=ldap
prog=`basename ${slapd}`
ldapuid=`id -u $user`
# Unaccessible database files.
slaptestflags=""
- for dbdir in `LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | sed s,^directory,,` ; do
+ for dbdir in `LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' $configfile | sed s,^directory,,` ; do
for file in `find ${dbdir}/ -not -uid $ldapuid -and \( -name "*.dbb" -or -name "*.gdbm" -or -name "*.bdb" -or -name "__db.*" -or -name "log.*" -or -name alock \)` ; do
echo -n $"$file is not owned by \"$user\"" ; warning ; echo
done
@@ -116,7 +125,7 @@
echo -n $"$file is not readable by \"$user\"" ; warning ; echo
fi
# Unaccessible TLS configuration files.
- tlsconfigs=`LANG=C egrep '^(TLSCACertificateFile|TLSCertificateFile|TLSCertificateKeyFile)[[:space:]]' /etc/openldap/slapd.conf | awk '{print $2}'`
+ tlsconfigs=`LANG=C egrep '^(TLSCACertificateFile|TLSCertificateFile|TLSCertificateKeyFile)[[:space:]]' $configfile | awk '{print $2}'`
for file in $tlsconfigs ; do
if ! testasuser $user -r $file ; then
echo -n $"$file is not readable by \"$user\"" ; warning ; echo
@@ -138,18 +147,19 @@
echo -n $"Checking configuration files for $prog: " ; failure ; echo
echo "$slaptestout"
if /sbin/runuser -m -s "$slaptest" -- "$user" "-u" > /dev/null 2> /dev/null ; then
- dirs=`LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | awk '{print $2}'`
+ dirs=`LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' $configfile | awk '{print $2}'`
for directory in $dirs ; do
if test -r $directory/__db.001 ; then
echo -n $"stale lock files may be present in $directory" ; warning ; echo
fi
done
fi
- exit 1
+ exit 6
fi
}
function start() {
+ [ -x $slapd ] || exit 5
configtest
# Define a couple of local variables which we'll need. Maybe.
user=ldap
@@ -168,7 +178,7 @@
echo -n $"Starting $prog: "
daemon --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS
RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ldap
+ [ $RETVAL -eq 0 ] && touch $lockfile
echo
return $RETVAL
}
@@ -179,7 +189,7 @@
echo -n $"Stopping $prog: "
killproc ${slapd}
RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ldap /var/run/slapd.args
+ [ $RETVAL -eq 0 ] && rm -f $lockfile /var/run/slapd.args
echo
return $RETVAL
}
@@ -201,12 +211,12 @@
status ${slapd}
RETVAL=$?
;;
- restart)
+ restart|force-reload)
stop
start
RETVAL=$?
;;
- condrestart)
+ condrestart|try-restart)
if [ -f /var/lock/subsys/ldap ] ; then
stop
start
@@ -214,8 +224,8 @@
fi
;;
*)
- echo $"Usage: $0 {start|stop|restart|status|condrestart}"
- RETVAL=1
+ echo $"Usage: $0 {start|stop|restart|status|condrestart|configtest}"
+ RETVAL=2
esac
exit $RETVAL
Index: openldap.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openldap/devel/openldap.spec,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- openldap.spec 25 Jan 2008 14:26:47 -0000 1.112
+++ openldap.spec 28 Jan 2008 11:45:46 -0000 1.113
@@ -9,7 +9,7 @@
Summary: The configuration files, libraries, and documentation for OpenLDAP
Name: openldap
Version: %{version}
-Release: 4%{?dist}
+Release: 5%{?dist}
License: OpenLDAP
Group: System Environment/Daemons
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
@@ -605,8 +605,12 @@
%attr(0644,root,root) %{evolution_connector_libdir}/*.a
%changelog
+* Mon Jan 28 2008 Jan Safranek <jsafranek at redhat.com> 2.4.7-5
+- init script made LSB-compliant (#247012)
+
* Fri Jan 25 2008 Jan Safranek <jsafranek at redhat.com> 2.4.7-4
- fixed rpmlint warnings and errors
+ - /etc/openldap/schema/README moved to /usr/share/doc/openldap
* Tue Jan 22 2008 Jan Safranek <jsafranek at redhat.com> 2.4.7-3
- obsoleting compat-openldap properly again :)
- Previous message (by thread): rpms/ftp/F-8 netkit-ftp-0.17-bitrate.patch, NONE, 1.1 ftp.spec, 1.41, 1.42
- Next message (by thread): rpms/ardour/F-8 .cvsignore, 1.3, 1.4 ardour.spec, 1.8, 1.9 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list