#!/bin/sh if [ $# -lt 1 ] then echo "$0 PREFIX" exit 1 fi PREFIX=$1 if test -z "$TLS_ENABLED"; then TLS_ENABLED=false fi DOMAIN=SAMBADOMAIN USERNAME=administrator REALM=SAMBA.EXAMPLE.COM PASSWORD=penguin SRCDIR=`pwd` ROOT=$USER SERVER=localhost NETBIOSNAME=localtest if test -z "$ROOT"; then ROOT=$LOGNAME fi if test -z "$ROOT"; then ROOT=`whoami` fi oldpwd=`pwd` srcdir=`dirname $0`/../.. mkdir -p $PREFIX || exit $? cd $PREFIX PREFIX_ABS=`pwd` export PREFIX_ABS cd $oldpwd TEST_DATA_PREFIX=$PREFIX_ABS export TEST_DATA_PREFIX TMPDIR=$PREFIX_ABS/tmp ETCDIR=$PREFIX_ABS/etc PIDDIR=$PREFIX_ABS/pid CONFFILE=$ETCDIR/smb.conf KRB5_CONFIG=$ETCDIR/krb5.conf PRIVATEDIR=$PREFIX_ABS/private NCALRPCDIR=$PREFIX_ABS/ncalrpc LOCKDIR=$PREFIX_ABS/lockdir TLSDIR=$PRIVATEDIR/tls DHFILE=$TLSDIR/dhparms.pem WINBINDD_SOCKET_DIR=$PREFIX_ABS/winbind_socket CONFIGURATION="--configfile=$CONFFILE" export CONFIGURATION export CONFFILE rm -rf $PREFIX/* mkdir -p $PRIVATEDIR $ETCDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR $TLSDIR cat >$CONFFILE<$KRB5_CONFIG<$DHFILE<$PRIVATEDIR/wins_config.ldif</dev/null || exit 1