config() {
  NEW="$1"
  OLD="$(dirname $NEW)/$(basename $NEW .new)"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
    # toss the redundant copy
    rm $NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}
preserve_perms() {
  NEW="$1"
  OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
  if [ -e ${OLD} ]; then
    cp -a ${OLD} ${NEW}.incoming
    cat ${NEW} > ${NEW}.incoming
    mv ${NEW}.incoming ${NEW}
  fi
  config ${NEW}
}
( cd usr/bin/32 ; rm -rf ldapadd )
( cd usr/bin/32 ; ln -sf ldapmodify ldapadd )
( cd usr/lib ; rm -rf liblber-2.4.so.2 )
( cd usr/lib ; ln -sf liblber-2.4.so.2.10.10 liblber-2.4.so.2 )
( cd usr/lib ; rm -rf liblber.so )
( cd usr/lib ; ln -sf liblber-2.4.so.2.10.10 liblber.so )
( cd usr/lib ; rm -rf libldap-2.4.so.2 )
( cd usr/lib ; ln -sf libldap-2.4.so.2.10.10 libldap-2.4.so.2 )
( cd usr/lib ; rm -rf libldap.so )
( cd usr/lib ; ln -sf libldap-2.4.so.2.10.10 libldap.so )
( cd usr/lib ; rm -rf libldap_r-2.4.so.2 )
( cd usr/lib ; ln -sf libldap_r-2.4.so.2.10.10 libldap_r-2.4.so.2 )
( cd usr/lib ; rm -rf libldap_r.so )
( cd usr/lib ; ln -sf libldap_r-2.4.so.2.10.10 libldap_r.so )
