From 001a81b9f4227eba6d73f76d8695189b7fa0605c Mon Sep 17 00:00:00 2001 From: Jan Šafránek Date: Jan 28 2008 12:12:02 +0000 Subject: init script fixes --- diff --git a/ldap.init b/ldap.init index 87afa30..42aa12a 100644 --- a/ldap.init +++ b/ldap.init @@ -41,6 +41,7 @@ slapd=/usr/sbin/slapd slaptest=/usr/sbin/slaptest lockfile=/var/lock/subsys/ldap configfile=/etc/openldap/slapd.conf +pidfile=/var/run/openldap/slapd.pid RETVAL=0 @@ -176,7 +177,7 @@ function start() { fi # Start daemons. echo -n $"Starting $prog: " - daemon --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS + daemon --pidfile=$pidfile --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS RETVAL=$? [ $RETVAL -eq 0 ] && touch $lockfile echo @@ -187,7 +188,7 @@ function stop() { # Stop daemons. prog=`basename ${slapd}` echo -n $"Stopping $prog: " - killproc ${slapd} + killproc -p $pidfile ${slapd} RETVAL=$? [ $RETVAL -eq 0 ] && rm -f $lockfile /var/run/slapd.args echo @@ -208,7 +209,7 @@ case "$1" in RETVAL=$? ;; status) - status ${slapd} + status -p $pidfile ${slapd} RETVAL=$? ;; restart|force-reload) diff --git a/openldap.spec b/openldap.spec index 483b000..63927a6 100644 --- a/openldap.spec +++ b/openldap.spec @@ -9,7 +9,7 @@ Summary: The configuration files, libraries, and documentation for OpenLDAP 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 @@ -605,6 +605,9 @@ fi %attr(0644,root,root) %{evolution_connector_libdir}/*.a %changelog +* Mon Jan 28 2008 Jan Safranek 2.4.7-6 +- init script fixes + * Mon Jan 28 2008 Jan Safranek 2.4.7-5 - init script made LSB-compliant (#247012)