|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T n
Length: 2287 (0x8ef)
Types: TextFile
Names: »north-america.sh«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/others/quipu/tools/dsaconfig/quipu/scripts/north-america.sh«
: run this script through /bin/sh
DISHPARENT=$$ export DISHPARENT
if [ $$ -ge 32768 ];
then
PORT="$$"
else
PORT="`expr $$ + 32768`"
fi
DISHPROC="127.0.0.1 $PORT" export DISHPROC
if bind -c "Alpaca" -u c=US@cn=Manager -pass secret ;
then
squid
else
exit 1
fi
cd "l=North America"
OLD=`head -2 EDB | tail -1 | awk '{ print $1 }'`
if search @c=US -singlelevel \
-filter "lastModifiedTime>=$OLD & objectClass=organization" \
-noname -nosequence ;
then
echo "at least one entry has changed in c=US since $OLD"
else
if search @c=CA -singlelevel \
-filter "lastModifiedTime>=$OLD & objectClass=organization" \
-noname -nosequence ;
then
echo "at least one entry has changed in c=CA since $OLD"
else
echo "no entries have changed in either c=US or c=CA since $OLD"
exit 0
fi
fi
EDB=`date -u | \
sed -e 's%:% %g' | \
awk 'BEGIN { months["Jan"] = 1;
months["Feb"] = 2;
months["Mar"] = 3;
months["Apr"] = 4;
months["May"] = 5;
months["Jun"] = 6;
months["Jul"] = 7;
months["Aug"] = 8;
months["Sep"] = 9;
months["Oct"] = 10;
months["Nov"] = 11;
months["Dec"] = 12; }
{ printf "%02d%02d%02d%02d%02d%02dZ", $8 % 100, months[$2], $3, $4, $5, $6 }'`
search @c=US -singlelevel -filter objectClass=organization \
-norelative -nosequence -nosizelimit -notimelimit > entries
search @c=CA -singlelevel -filter objectClass=organization \
-norelative -nosequence -nosizelimit -notimelimit >> entries
echo MASTER > EDB.new
echo "$EDB" >> EDB.new
sort < entries | while read x; do
y=`echo "$x" | awk -F@ '{ print $2 }'`
z=`echo "$x" | awk -F@ '{ print $1 }' | sed -e 's%c=%l=%'`
echo "$y%$z" >> EDB.new
echo "acl=" >> EDB.new
showentry "@$x" -type telephoneNumber -edb >> EDB.new
showentry "@$x" -type organizationName -edb >> EDB.new
echo "aliasedObjectName= $x" >> EDB.new
echo "objectClass= quipuObject & organization & alias & top" >> EDB.new
echo '' >> EDB.new
done
if testedb < EDB.new; then
dsacontrol -lock "l=North America"
mv EDB EDB.bak
mv EDB.new EDB
dsacontrol -refresh "l=North America"
dsacontrol -unlock "l=North America"
echo "EDB updated"
else
echo "EDB not updated!"
fi
unbind
exit 0