openbsd-ports/databases/ruby-ldap/patches/patch-test_test_sh
bernd 635020d778 Initial import of ruby-ldap-0.9.7.
Ruby/LDAP is an extension library for Ruby. It provides the interface
to some LDAP libraries (e.g. OpenLDAP, UMich LDAP, Netscape SDK,
ActiveDirectory). The common API for application development is
described in RFC1823 and is supported by Ruby/LDAP.

Submitted and maintained by Jeremy Evans <jeremyevans0 at gmail dot com>.

with help from msf@
2007-01-18 12:30:37 +00:00

41 lines
932 B
Plaintext

$OpenBSD: patch-test_test_sh,v 1.1.1.1 2007/01/18 12:30:37 bernd Exp $
--- test/test.sh.orig Sat Nov 29 13:13:21 2003
+++ test/test.sh Wed Dec 20 14:46:44 2006
@@ -139,13 +139,16 @@ if [ -f "$LOGFILE" ]; then
rm $LOGFILE
fi
-echo -n "Do you want to run scripts?[y/n]"
-read ans
+ans=y
case "$ans" in
y*|Y*)
RESULT=ok
for f in $SCRIPTS
do
+ if ! $(pgrep -x slapd >/dev/null 2>&1); then
+ echo "ERROR: slapd is gone, abort"
+ exit 1
+ fi
printf "running $f .... "
if runruby $f; then
echo "succeed"
@@ -153,7 +156,7 @@ y*|Y*)
echo "fail"
RESULT=error
runruby $f
- rundebug $f
+# rundebug $f
fi
done
;;
@@ -166,5 +169,7 @@ esac
# $LDAPSEARCH -b "o=JAIST, c=JP" -h localhost -p $SSLPORT -Z "(objectclass=*)"
# stop slapd
-kill -TERM `cat $PIDFILE`
+if $(pgrep -x slapd >/dev/null 2>&1); then
+ kill -TERM `cat $PIDFILE`
+fi
rm -rf $DBDIR