#50504 correction to fix for #50417
Closed 3 years ago by spichugi. Opened 4 years ago by lkrispen.
lkrispen/389-ds-base t50417  into  master

@@ -44,7 +44,7 @@ 

          instance=`get_slapd_instance @instconfigdir@ $SERV_ID` || { echo Instance $SERV_ID not found. ; return 1 ; }

  

          CONFIG_DIR="@instconfigdir@/slapd-$instance";

-         PIDFILE=$RUN_DIR/slapd-$SERV_ID.pid

+         PIDFILE=@localstatedir@$RUN_DIR/slapd-$SERV_ID.pid

  

          if test -f $PIDFILE ; then

              PID=`cat $PIDFILE`
@@ -58,12 +58,12 @@ 

          if test 1 -eq @enable_asan@; then

              echo "NOTICE: Starting instance ${SERV_ID} with ASAN options."

              echo "This is probably not what you want. Please contact support."

-             : ${ASAN_LOG_PATH:=$RUN_DIR/ns-slapd-${SERV_ID}.asan}

+             : ${ASAN_LOG_PATH:=@localstatedir@$RUN_DIR/ns-slapd-${SERV_ID}.asan}

              echo "Asan errors will go to ${ASAN_LOG_PATH}*"

              export ASAN_OPTIONS="detect_leaks=1 symbolize=1 detect_deadlocks=1 log_path=${ASAN_LOG_PATH}"

              export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer

          fi

-         $SERVERBIN_DIR/ns-slapd -D $CONFIG_DIR -i $PIDFILE "$@"

+         @sbindir@/ns-slapd -D $CONFIG_DIR -i $PIDFILE "$@"

          if [ $? -ne 0 ]; then

              return 1

          fi

@@ -13,7 +13,7 @@ 

  stop_instance() {

      SERV_ID=$1

  

-     PIDFILE=$RUN_DIR/slapd-$SERV_ID.pid

+     PIDFILE=@localstatedir@$RUN_DIR/slapd-$SERV_ID.pid

      if test ! -f $PIDFILE ; then

          echo No ns-slapd PID file found. Server is probably not running

          return 2

Bug: The patch for 50417 did break start-dirsrv and stop-dirsrv.
Some paths were not correctly set

Fix: use path variable like in other legacy scripts, eg @sbindir@

Reviewed by: ?

Works for me on non-prefix builds. Ack

rebased onto c482e15

4 years ago

Pull-Request has been merged by lkrispen

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3560

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago