annotate test.bash @ 12:3f627519a92d stable-0-5-2

properly ignore (second block zero) errors. that will just drop some unknown attachments, but the rest of the data is still found
author carl
date Sat, 18 Feb 2006 09:56:00 -0800
parents 8dd68d722fa8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
1 #!/bin/bash
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
2
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
3 #scp ams:/usr/usr/USR/USR/STAN/NNdbase.txt .
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
4 #scp ams:/usr/usr/USR/USR/STAN/outlook.pst .
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
5
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
6 make
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
7 f=/home/ldap/ams.ldif
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
8 ./pst2ldif -b 'o=ams-cc.com, c=US' -c 'newPerson' outlook.pst >$f
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
9 dos2unix <NNdbase.txt | ./nick2ldif -b 'o=ams-cc.com, c=US' -c 'newPerson' >>$f
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
10 less $f
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
11 (
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
12 cd /home/ldap
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
13 /etc/rc.d/init.d/ldap stop
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
14 d=data/ams-cc.com
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
15 rm -rf $d
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
16 mkdir $d
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
17 chown ldap:ldap $d
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
18 /etc/rc.d/init.d/ldap start
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
19 sleep 5
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
20 ldapadd -c -x -D 'cn=root, o=ams-cc.com, c=US' -w 'summer-unmade' -v <$f >$f.log 2>&1
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
21 ldapsearch -z 0 -x -D 'cn=root, o=ams-cc.com, c=US' -w 'summer-unmade' -v -b 'o=ams-cc.com, c=US' 'objectclass=*' | grep -v '^#' >$f.all
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
22
8dd68d722fa8 add ldif converters
carl
parents:
diff changeset
23 )