From c482e15aa9d014284cecddedc6e2fd52a65a24ec Mon Sep 17 00:00:00 2001 From: Ludwig Krispenz Date: Jul 18 2019 14:41:08 +0000 Subject: correction to fix for #50417 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: Mark, thanks --- diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in index a6d63d3..c1ed5f7 100755 --- a/ldap/admin/src/scripts/start-dirsrv.in +++ b/ldap/admin/src/scripts/start-dirsrv.in @@ -44,7 +44,7 @@ start_instance() { 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 @@ start_instance() { 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 diff --git a/ldap/admin/src/scripts/stop-dirsrv.in b/ldap/admin/src/scripts/stop-dirsrv.in index 755cd8b..7c25034 100755 --- a/ldap/admin/src/scripts/stop-dirsrv.in +++ b/ldap/admin/src/scripts/stop-dirsrv.in @@ -13,7 +13,7 @@ RUN_DIR="@localrundir@/@PACKAGE_NAME@"; 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