Просмотр исходного кода

a couple of enhancements that make it easier to run the server under various debugging tools

Rich Megginson 17 лет назад
Родитель
Сommit
27f282f02a
2 измененных файлов с 9 добавлено и 2 удалено
  1. 7 0
      ldap/admin/src/initconfig.in
  2. 2 2
      ldap/admin/src/scripts/template-start-slapd.in

+ 7 - 0
ldap/admin/src/initconfig.in

@@ -31,3 +31,10 @@ if [ "$OS" = "SunOS" -a -f /usr/lib/64/libumem.so ] ; then
     LD_PRELOAD_64=/usr/lib/64/libumem.so
     export LD_PRELOAD_64
 fi
+
+# how many seconds to wait for the startpid file to show
+# up before we assume there is a problem and fail to start
+#STARTPID_TIME=10 ; export STARTPID_TIME
+# how many seconds to wait for the pid file to show
+# up before we assume there is a problem and fail to start
+#PID_TIME=600 ; export PID_TIME

+ 2 - 2
ldap/admin/src/scripts/template-start-slapd.in

@@ -47,7 +47,7 @@ fi
 
 loop_counter=1
 # wait for 10 seconds for the start pid file to appear
-max_count=10
+max_count=${STARTPID_TIME:-10}
 while test $loop_counter -le $max_count; do
     loop_counter=`expr $loop_counter + 1`
     if test ! -f $STARTPIDFILE ; then
@@ -62,7 +62,7 @@ if test ! -f $STARTPIDFILE ; then
 fi
 loop_counter=1
 # wait for 10 minutes (600 times 1 seconds)
-max_count=600
+max_count=${PID_TIME:-600}
 while test $loop_counter -le $max_count; do
     loop_counter=`expr $loop_counter + 1`
     if test ! -f $PIDFILE ; then