Tuesday, March 29, 2016

[389-commits] ldap/admin

ldap/admin/src/scripts/start-dirsrv.in | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)

New commits:
commit 46dbd62db4413c1a1ea3adfb1f07863a4f2982ba
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue Mar 29 16:45:59 2016 -0700

Ticket #48779 - Remove startpidfile check in start-dirsrv

Description: Since this fix was made, startpid file is not longer
generated in the systemd start.
Ticket 47951 - Add PIDFile option to .service
commit d4deb29a2ed2c738fab41500e6c806f40c4dff17
start-dirsrv script should be updated to adjust to the fix.

https://fedorahosted.org/389/ticket/48779

Reviewed by wibrown@redhat.com (Thank you, William!!)

diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in
index 513addb..4bc0ba2 100755
--- a/ldap/admin/src/scripts/start-dirsrv.in
+++ b/ldap/admin/src/scripts/start-dirsrv.in
@@ -41,16 +41,6 @@ start_instance() {
export DS_CONFIG_DIR
PIDFILE=$RUN_DIR/$PRODUCT_NAME-$SERV_ID.pid

- STARTPIDFILE=$RUN_DIR/$PRODUCT_NAME-$SERV_ID.startpid
- if test -f $STARTPIDFILE ; then
- PID=`cat $STARTPIDFILE`
- if kill -s 0 $PID > /dev/null 2>&1 ; then
- echo There is an ns-slapd process already running: $PID
- return 2;
- else
- rm -f $STARTPIDFILE
- fi
- fi
if test -f $PIDFILE ; then
PID=`cat $PIDFILE`
if kill -s 0 $PID > /dev/null 2>&1 ; then
@@ -70,27 +60,12 @@ start_instance() {
return 1
fi
else
- $SERVERBIN_DIR/ns-slapd -D $CONFIG_DIR -i $PIDFILE -w $STARTPIDFILE "$@"
+ $SERVERBIN_DIR/ns-slapd -D $CONFIG_DIR -i $PIDFILE "$@"
if [ $? -ne 0 ]; then
return 1
fi
fi
loop_counter=1
- # wait for 10 seconds for the start pid file to appear
- max_count=${STARTPID_TIME:-10}
- while test $loop_counter -le $max_count; do
- loop_counter=`expr $loop_counter + 1`
- if test ! -f $STARTPIDFILE ; then
- sleep 1;
- else
- PID=`cat $STARTPIDFILE`
- fi
- done
- if test ! -f $STARTPIDFILE ; then
- echo Server failed to start !!! Please check errors log for problems
- return 1
- fi
- loop_counter=1
# wait for 10 minutes (600 times 1 seconds)
max_count=${PID_TIME:-600}
while test $loop_counter -le $max_count; do
@@ -104,7 +79,6 @@ start_instance() {
fi
else
PID=`cat $PIDFILE`
- rm -f $STARTPIDFILE
return 0;
fi
done

--
389 commits mailing list
389-commits@%(host_name)s
http://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org

No comments:

Post a Comment