[Date Prev][Date Next] [Chronological] [Thread] [Top]

Share success (sorry no programming)



Nice move (smooth) - I am just a working sysadm as yet.

I just noticed a lot of energy used in explaning stuff (especially
"undefined attribute").

What I CAN share is my one script download/port/install script using memory
file system for speed.

Rgds

Henrik
------------------------------------------------------------------

# New download

dir=`pwd`

# Use memory file system if exists
if [ -d /mfs ]; then cd /mfs; fi;

PATH=$PATH:/usr/local/bin
export PATH

########################
# LDAP
########################

# Options: -c (continue), -N (download only if newer), --retr-symlinks
(follow links)
#release=openldap-stable
release=openldap-release
/usr/local/bin/wget -cN  --retr-symlinks
ftp://ftp.openldap.org/pub/OpenLDAP/$release.tgz

gunzip -c $release.tgz | tar xf -

release=`gunzip -c $release.tgz | tar tf - | sed '1q' | cut -d'/' -f1`
cd $release

echo "Change Makefile in servers/slapd/ and servers/slapd/tools/ to avooooid
SLAPD_LIBS error"
(cp ./build/top.mk /tmp; cat /tmp/top.mk | grep -v 'SLAPD_LIBS =
@SLAPD_LIBS' | grep -v '@SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@' >
./build/top.mk)

# This a hint from the mail list - not tested
# LDFLAGS="-L/usr/local/BerkeleyDB.3.0/lib -R/usr/local/BerkeleyDB.3.0/lib"
# CPPFLAGS="-I/usr/local/BerkeleyDB.3.0/include"
# export LDFLAGS CPPFLAGS
# ./configure --prefix=/usr/local

# Using BerkeleyDB 2.7.7
# CC=cc CFLAGS=-pthread LDFLAGS=-oldstyle_liblookup ./configure

# Using BerkeleyDB 2.7.7 and SASL
CPPFLAGS="-I/usr/local/include"
export CPPFLAGS
CC=cc CFLAGS=-pthread LDFLAGS=-oldstyle_liblookup ./configure
--with-cyrus-sasl

# Using BerkeleyDB 2.7.7 and SSL
#CPPFLAGS=-I/usr/local/ssl/include \
#LDFLAGS=-L/usr/local/ssl/lib \
#CC=cc CFLAGS=-pthread LDFLAGS=-oldstyle_liblookup ./configure --with-tls

make depend
make

# Ajust tests or install GNU diff, (patch made with diff)
patch tests/scripts/test005-modrdn $dir/patch_test5

make test
make install

# Boot scripts
cat > /sbin/init.d/ldap <<EOF
#!/sbin/sh
REPLICA=`egrep -c "^replica" /usr/local/etc/openldap/slapd.conf`
case "\$1" in
'start')        /usr/local/libexec/slapd; if [ \$REPLICA -ge 1 ]; then
/usr/local/libexec/slurpd; fi
                ;;
'stop')         /bin/ps -e | egrep "libexec/sl[au].*pd\$" | awk
'{pid=\$1;system("kill -9 " pid)}'
                ;;
*)              echo "usage: \$0 {start|stop}"
                ;;
esac
EOF
chmod 710 /sbin/init.d/ldap 
ln -sf /sbin/init.d/ldap /sbin/rc2.d/K80ldap
ln -sf /sbin/init.d/ldap /sbin/rc3.d/S80ldap

echo "#Configure LDAP Server:"
echo 
echo "vi /usr/local/etc/openldap/slapd.conf # Change the following"
echo 
echo "   database        ldbm"
echo "   suffix          "dc=backoffice, dc=dk""
echo "   rootdn          "cn=Manager, dc=backofice, dc=dk""
echo 
echo "#Start LDAP Server:"
echo 
echo "/usr/local/libexec/slapd -d -1        # Run slapd with console debug
output"
echo 
echo "#Define new entry:"
echo 
echo "vi add.ldif                           # Add new entry file"
echo 
echo "   dn: dc=backoffice,dc=dk "
echo "   objectclass: dcObject "
echo "   objectclass: organization "
echo "   o: Backoffice Operations"
echo "   dc: backoffice "
echo 
echo "   dn: cn=Manager,dc=backoffice,dc=dk "
echo "   objectclass: organizationalRole "
echo "   cn: Manager"
echo 
echo "#Add new entry:"
echo 
echo "/usr/local/bin/ldapadd -r -x -D "cn=Manager,dc=backoffice,dc=dk" -w
secret -f add.ldif"
echo 
# 

-----Original Message-----
From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
Sent: 1. februar 2001 16:08
To: Henrik Lassen
Cc: 'rdrake@telusplanet.net'; openldap-software@OpenLDAP.org
Subject: Re: Super idea: Debug print the undefined attribute


At 11:30 AM 2/1/01 +0100, Henrik Lassen wrote:
>Super idea: Debug print the undefined attribute!
>
>Why on earth has no one done this before insted of answering all these
>postings!
>
>Action speaks!

I agree.  When should I expect your patch?

Kurt