rpms/openldap/devel ldap.init,1.32,1.33 openldap.spec,1.147,1.148
Jan Zeleny
jzeleny at fedoraproject.org
Wed Sep 16 14:06:38 UTC 2009
- Previous message (by thread): rpms/libtalloc/devel libtalloc.spec,1.5,1.6
- Next message (by thread): rpms/phpldapadmin/devel phpldapadmin-1.2.0.3-config.patch, NONE, 1.1 .cvsignore, 1.10, 1.11 phpldapadmin.spec, 1.19, 1.20 sources, 1.11, 1.12 phpldapadmin-1.1.0.5-config.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jzeleny
Update of /cvs/extras/rpms/openldap/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1082
Modified Files:
ldap.init openldap.spec
Log Message:
updated init script to be LSB-compliant (#523434)
Index: ldap.init
===================================================================
RCS file: /cvs/extras/rpms/openldap/devel/ldap.init,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- ldap.init 9 Jun 2009 11:43:35 -0000 1.32
+++ ldap.init 16 Sep 2009 14:06:36 -0000 1.33
@@ -8,10 +8,10 @@
# for implementing the industry standard directory services.
# processname: slapd
# config: /etc/openldap/slapd.conf
-# pidfile: /var/run/openldap/slapd.pid
+# pidfile: /var/run/slapd.pid
### BEGIN INIT INFO
-# Provides: ldap
+# Provides: slapd
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Should-Start:
@@ -41,9 +41,10 @@ fi
slapd=/usr/sbin/slapd
slaptest=/usr/sbin/slaptest
-lockfile=/var/lock/subsys/ldap
+lockfile=/var/lock/subsys/slapd
configfile=/etc/openldap/slapd.conf
-pidfile=/var/run/openldap/slapd.pid
+pidfile=/var/run/slapd.pid
+slapd_pidfile=/var/run/openldap/slapd.pid
RETVAL=0
@@ -163,6 +164,7 @@ function configtest() {
function start() {
[ -x $slapd ] || exit 5
+ [ `id -u` -eq 0 ] || exit 4
configtest
# Define a couple of local variables which we'll need. Maybe.
user=ldap
@@ -181,7 +183,10 @@ function start() {
echo -n $"Starting $prog: "
daemon --pidfile=$pidfile --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS
RETVAL=$?
- [ $RETVAL -eq 0 ] && touch $lockfile
+ if [ $RETVAL -eq 0 ]; then
+ touch $lockfile
+ ln $slapd_pidfile $pidfile
+ fi
echo
return $RETVAL
}
@@ -189,10 +194,15 @@ function start() {
function stop() {
# Stop daemons.
prog=`basename ${slapd}`
+ [ `id -u` -eq 0 ] || exit 4
echo -n $"Stopping $prog: "
- killproc -p $pidfile -d $SLAPD_SHUTDOWN_TIMEOUT ${slapd}
+
+ # This will remove pid and args files from /var/run/openldap
+ killproc -p $slapd_pidfile -d $SLAPD_SHUTDOWN_TIMEOUT ${slapd}
RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f $lockfile /var/run/slapd.args
+
+ # Now we want to remove lock file and hardlink of pid file
+ [ $RETVAL -eq 0 ] && rm -f $pidfile $lockfile
echo
return $RETVAL
}
@@ -220,15 +230,17 @@ case "$1" in
RETVAL=$?
;;
condrestart|try-restart)
- if [ -f /var/lock/subsys/ldap ] ; then
- stop
- start
- RETVAL=$?
- fi
+ status -p $pidfile ${slapd} || exit 0
+ stop
+ start
+ ;;
+ usage)
+ echo $"Usage: $0 {start|stop|restart|status|condrestart|configtest|usage}"
+ RETVAL=0
;;
*)
- echo $"Usage: $0 {start|stop|restart|status|condrestart|configtest}"
- RETVAL=2
+ echo $"Usage: $0 {start|stop|restart|status|condrestart|configtest|usage}"
+ RETVAL=3
esac
exit $RETVAL
Index: openldap.spec
===================================================================
RCS file: /cvs/extras/rpms/openldap/devel/openldap.spec,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -p -r1.147 -r1.148
--- openldap.spec 27 Aug 2009 07:46:45 -0000 1.147
+++ openldap.spec 16 Sep 2009 14:06:37 -0000 1.148
@@ -11,7 +11,7 @@
Summary: LDAP support libraries
Name: openldap
Version: %{version}
-Release: 5%{?dist}
+Release: 6%{?dist}
License: OpenLDAP
Group: System Environment/Daemons
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
@@ -359,7 +359,7 @@ rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/ope
# Install an init script for the servers.
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
-install -m 755 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ldap
+install -m 755 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/slapd
# Install syconfig/ldap
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
@@ -561,7 +561,7 @@ fi
%attr(0644,root,root) %doc DB_CONFIG.example
%doc README.schema
%ghost %config(noreplace) %{_sysconfdir}/pki/tls/certs/slapd.pem
-%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/ldap
+%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/slapd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/ldap*.conf
%attr(0640,root,ldap) %config(noreplace) %{_sysconfdir}/openldap/slapd.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/ldap
@@ -606,6 +606,9 @@ fi
%attr(0644,root,root) %{evolution_connector_libdir}/*.a
%changelog
+* Wed Sep 16 2009 Jan Zeleny <jzeleny at redhat.com> 2.4.16-6
+- updated init script to be LSB-compliant (#523434)
+
* Thu Aug 27 2009 Tomas Mraz <tmraz at redhat.com> - 2.4.16-5
- rebuilt with new openssl
- Previous message (by thread): rpms/libtalloc/devel libtalloc.spec,1.5,1.6
- Next message (by thread): rpms/phpldapadmin/devel phpldapadmin-1.2.0.3-config.patch, NONE, 1.1 .cvsignore, 1.10, 1.11 phpldapadmin.spec, 1.19, 1.20 sources, 1.11, 1.12 phpldapadmin-1.1.0.5-config.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list