* env-setup.shin: Export $libdir.
authorKen Raeburn <raeburn@mit.edu>
Wed, 17 Aug 2005 01:46:59 +0000 (01:46 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 17 Aug 2005 01:46:59 +0000 (01:46 +0000)
* init_db: Substitue __MODDIR__ with the fakedest module directory.
* start_servers: Likewise.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17336 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/testing/scripts/ChangeLog
src/kadmin/testing/scripts/env-setup.shin
src/kadmin/testing/scripts/init_db
src/kadmin/testing/scripts/start_servers

index 6330c23a098ed84cef79339e0878a9e7eb02e9e7..59a925093a933078df43aeb616336c0e4584433a 100644 (file)
@@ -1,3 +1,10 @@
+2005-08-16  Ken Raeburn  <raeburn@mit.edu>
+
+       * env-setup.shin: Export $libdir.
+       * init_db: Substitue __MODDIR__ with the fakedest module
+       directory.
+       * start_servers: Likewise.
+
 2004-09-30  Ken Raeburn  <raeburn@mit.edu>
 
        * start_servers_local: If one of the servers failed to start, log
index 0f790ac1c291150989fe8dd6dc4ddc2e7d91ef75..03e6d065e293e41ffae25abae073f821f87f1261 100644 (file)
@@ -15,6 +15,10 @@ TOP=@RBUILD@/kadmin
 STOP=@S_TOP@/kadmin
 export TOP
 export STOP
+# These two may be needed in case $libdir references them.
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@ ; eval "libdir=$libdir"; export libdir
 
 # The shared library run time setup
 TOPLIBD=@RBUILD@/lib
index bc7ac216e7a9c6a386050eea91c1e4b248a6beb5..5ebacc0919ee999e202485549881fb2ebf5c4c65 100644 (file)
@@ -18,13 +18,28 @@ if [ "$STOP" = "" ]; then
        exit 1
 fi
 
+if [ "$libdir" = "" ]; then
+       echo "init_db: Environment variable \$libdir must point to library install directory" 1>&2
+       exit 1
+fi
+
 IROOT=$TOP/..
 ADMIN=$TOP/dbutil
 BIN=$IROOT/bin
 ETC=$IROOT/etc
+MODDIR=$TOP/../util/fakedest$libdir/db-modules
 SBIN=$TOP/keytab:$TOP/server
 DUMMY=${REALM=SECURE-TEST.OV.COM}; export REALM
 
+if [ ! -d $MODDIR ]; then
+       echo "+++" 1>&2
+       echo "+++ Error!  $MODDIR does not exist!" 1>&2
+       echo "+++ The MODDIR variable should point to the directory in which" 1>&2
+       echo "+++ database modules have been installed for testing." 1>&2
+       echo "+++" 1>&2
+       exit 1
+fi
+
 DUMMY=${TESTDIR=$TOP/testing}; export TESTDIR
 DUMMY=${STESTDIR=$STOP/testing}
 DUMMY=${SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl}; export SRVTCL
@@ -67,6 +82,7 @@ qualname=`$QUALNAME`
 sed -e "s/__REALM__/$REALM/g" -e "s#__K5ROOT__#$K5ROOT#g" \
        -e "s/__KDCHOST__/$qualname/g" \
        -e "s/__LOCALHOST__/$qualname/g" \
+       -e "s#__MODDIR__#$MODDIR#g" \
        < $STESTDIR/proto/krb5.conf.proto > $K5ROOT/krb5.conf
 sed -e "s/__REALM__/$REALM/g" -e "s#__K5ROOT__#$K5ROOT#g" \
        < $STESTDIR/proto/kdc.conf.proto > $K5ROOT/kdc.conf
index d38a42f523f772464cafe5ccdfee5a379986c170..b59d97b918e04231eb57bbaadbc0d8d3a43cd560 100644 (file)
@@ -41,6 +41,7 @@ if [ $local = 0 ]; then
        sed -e "s/__REALM__/$REALM/g" -e "s#__K5ROOT__#$K5ROOT#g" \
                -e "s/__KDCHOST__/$hostname/g" \
                -e "s/__LOCALHOST__/$localname/g" \
+               -e "s#__MODDIR__#$TOP/../util/fakedest$libdir/db-modules#g"\
                < $STESTDIR/proto/krb5.conf.proto > $K5ROOT/krb5.conf
 
 # Using /usr/ucb/rsh and getting rid of "-k $REALM" until we get