mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-07 07:30:57 -05:00
Only use a db_stat in PATH if it matches our environment.
This commit is contained in:
parent
2eeefd4985
commit
74e4f9051f
1 changed files with 13 additions and 5 deletions
|
|
@ -476,12 +476,20 @@ if test $RC != 0 ; then
|
|||
exit $RC
|
||||
fi
|
||||
|
||||
type db_stat >/dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "Could not find db_stat ($RC)!"
|
||||
db_stat=
|
||||
for path in `echo "$PATH" | sed -e 's/:/ /g'`; do
|
||||
if test -f "$path/db_stat" && \
|
||||
"$path/db_stat" -E -h $PRODDIR/db > /dev/null 2>&1
|
||||
then
|
||||
db_stat="$path/db_stat"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$db_stat" ; then
|
||||
echo "Could not find a working db_stat in PATH!"
|
||||
lock_bug=1
|
||||
elif db_stat -E -h $PRODDIR/db | egrep -q 'HELD .* len:'; then
|
||||
elif "$db_stat" -E -h $PRODDIR/db | egrep -q 'HELD .* len:'; then
|
||||
echo "WARNING: Glue lock bug hit, next modify could deadlock"
|
||||
lock_bug=2
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue