[csw-devel] SF.net SVN: gar:[19181] csw/mgar/pkg/openldap/trunk/files/cswopenldap

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon Sep 10 19:53:57 CEST 2012


Revision: 19181
          http://gar.svn.sourceforge.net/gar/?rev=19181&view=rev
Author:   dmichelsen
Date:     2012-09-10 17:53:57 +0000 (Mon, 10 Sep 2012)
Log Message:
-----------
openldap/trunk: Use adjustable filedescriptors and remove slurpd in rc script

Modified Paths:
--------------
    csw/mgar/pkg/openldap/trunk/files/cswopenldap

Modified: csw/mgar/pkg/openldap/trunk/files/cswopenldap
===================================================================
--- csw/mgar/pkg/openldap/trunk/files/cswopenldap	2012-09-10 14:39:23 UTC (rev 19180)
+++ csw/mgar/pkg/openldap/trunk/files/cswopenldap	2012-09-10 17:53:57 UTC (rev 19181)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Start script for CSW www.blastwave.org package of Openldap.
-# slapd and slurpd can be started by this script.
+# slapd can be started by this script.
 # For either daemon to start, the minimum requirement is that
 #   /opt/csw/etc/openldap/slapd.conf must exist.  It does not
 #   exist after the initial package installation, since you may
@@ -15,11 +15,8 @@
 #  mkdir -p /etc/opt/csw
 #  cp /opt/csw/share/doc/openldap/openldaprc /etc/opt/csw/
 #
-# If no openldaprc file is available, the daemon starts with defaults 
-#  and slurpd is not started.
+# If no openldaprc file is available, the daemon starts with defaults.
 #
-# To start slurpd, set SLURPD_START=true in openldaprc
-#
 # 2005-08-11  Applied patch from Martin Foster to fix the problem
 #             when multiple uri are on the -h option.
 # 2006-06-11  Included patch from Ben Klang.  This update allows you
@@ -81,7 +78,6 @@
 ### END OPENCSW ARCHITECTURE SELECTION
 
 SLAPD=$libexecdir/slapd
-SLURPD=$libexecdir/slurpd
 
 # Make sure required vars are set.  Actually these are the compiled defaults
 DEF_SLAPD_CONFIG_FILE=@sysconfdir@/openldap/slapd.conf
@@ -117,6 +113,7 @@
        if [ -n "$SLAPD_SYNTAX_CHECK" ] ; then START="$START -t"; fi
        if [ -n "$SLAPD_USER" ] ; then START="$START -u $SLAPD_USER"; fi
        if [ -n "$SLAPD_EXTRA" ] ; then START="$START $SLAPD_EXTRA"; fi
+       if [ -n "$SLAPD_MAXFDS" ] ; then ulimit -n "$SLAPD_MAXFDS"; fi
 
        # Run it
        sh -c "$START"
@@ -129,31 +126,6 @@
 	return 1
     fi
 
-    [ -z "$SLURPD_START" ] && return 0
-
-    if kill -0 `pgrep -x slurpd` > /dev/null 2>&1 ; then
-        echo "openldap-slurpd (`pgrep -x slurpd`) seems to be running."
-        return 1
-    fi
-
-    printf "%-60s" "Starting openldap-slurpd: " 
-    	$SLURPD \
-	    `[ -n "$SLURPD_DEBUG_LEVEL" ] && echo "-d $SLURPD_DEBUG_LEVEL"` \
-	    `[ -n "$SLURPD_SYSLOG_LEVEL" ] && echo "-s $SLURPD_SYSLOG_LEVEL"` \
-	    `[ -n "$SLURPD_CONFIG_FILE" ] && echo "-f $SLURPD_CONFIG_FILE"` \
-	    `[ -n "$SLURPD_REPL_LOG_FILE" ] && echo "-r $SLURPD_REPL_LOG_FILE"` \
-	    `[ -n "$SLURPD_TMP_DIR" ] && echo "-t $SLURPD_TMP_DIR"` \
-	    `[ -n "$SLURPD_ONE_SHOT" ] && echo "-o"` \
-	    `[ -n "$SLURPD_SERVICE_NAME" ] && echo "-n $SLURPD_SERVICE_NAME"` \
-	    >/dev/null 2>&1
-	RETVAL=$?
-	if [ $RETVAL = 0 ] ; then
-	    echo "[  OK  ]"
-	else
-	    echo "[FAILED]"
-	    return 1
-	fi
-
     return 0
 }
 
@@ -174,22 +146,7 @@
 	echo "[FAILED]"
     fi
 
-    [ -z "$SLURPD_START" ] && return 0
-	printf "%-60s" "Shutting down openldap-slurpd: "
-	if test -n "`pgrep -x slurpd`" ; then
-	    kill `pgrep -x slurpd` >/dev/null 2>&1
-	    RETVAL=$?
-	else
-	    RETVAL=1
-	fi
-	if [ $RETVAL = 0 ] ; then
-	    echo "[  OK  ]"
-	else
-	    echo "[FAILED]"
-	fi
-
-    echo ""
-    return 0
+    return $RETVAL
 }
 
 case $1 in

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list