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 lib ; rm -rf libgssapi_krb5.so.2 )
( cd lib ; ln -sf libgssapi_krb5.so.2.2 libgssapi_krb5.so.2 )
( cd lib ; rm -rf libk5crypto.so.3 )
( cd lib ; ln -sf libk5crypto.so.3.1 libk5crypto.so.3 )
( cd lib ; rm -rf libkrb5.so.3 )
( cd lib ; ln -sf libkrb5.so.3.3 libkrb5.so.3 )
( cd lib ; rm -rf libkrb5support.so.0 )
( cd lib ; ln -sf libkrb5support.so.0.1 libkrb5support.so.0 )
( cd usr/lib ; rm -rf libgssapi_krb5.so )
( cd usr/lib ; ln -sf libgssapi_krb5.so.2.2 libgssapi_krb5.so )
( cd usr/lib ; rm -rf libgssapi_krb5.so.2 )
( cd usr/lib ; ln -sf libgssapi_krb5.so.2.2 libgssapi_krb5.so.2 )
( cd usr/lib ; rm -rf libgssapi_krb5.so.2.2 )
( cd usr/lib ; ln -sf ../../lib/libgssapi_krb5.so.2.2 libgssapi_krb5.so.2.2 )
( cd usr/lib ; rm -rf libgssrpc.so )
( cd usr/lib ; ln -sf libgssrpc.so.4.2 libgssrpc.so )
( cd usr/lib ; rm -rf libgssrpc.so.4 )
( cd usr/lib ; ln -sf libgssrpc.so.4.2 libgssrpc.so.4 )
( cd usr/lib ; rm -rf libk5crypto.so )
( cd usr/lib ; ln -sf libk5crypto.so.3.1 libk5crypto.so )
( cd usr/lib ; rm -rf libk5crypto.so.3 )
( cd usr/lib ; ln -sf libk5crypto.so.3.1 libk5crypto.so.3 )
( cd usr/lib ; rm -rf libk5crypto.so.3.1 )
( cd usr/lib ; ln -sf ../../lib/libk5crypto.so.3.1 libk5crypto.so.3.1 )
( cd usr/lib ; rm -rf libkadm5clnt.so )
( cd usr/lib ; ln -sf libkadm5clnt_mit.so libkadm5clnt.so )
( cd usr/lib ; rm -rf libkadm5clnt_mit.so )
( cd usr/lib ; ln -sf libkadm5clnt_mit.so.12.0 libkadm5clnt_mit.so )
( cd usr/lib ; rm -rf libkadm5clnt_mit.so.12 )
( cd usr/lib ; ln -sf libkadm5clnt_mit.so.12.0 libkadm5clnt_mit.so.12 )
( cd usr/lib ; rm -rf libkadm5srv.so )
( cd usr/lib ; ln -sf libkadm5srv_mit.so libkadm5srv.so )
( cd usr/lib ; rm -rf libkadm5srv_mit.so )
( cd usr/lib ; ln -sf libkadm5srv_mit.so.12.0 libkadm5srv_mit.so )
( cd usr/lib ; rm -rf libkadm5srv_mit.so.12 )
( cd usr/lib ; ln -sf libkadm5srv_mit.so.12.0 libkadm5srv_mit.so.12 )
( cd usr/lib ; rm -rf libkdb5.so )
( cd usr/lib ; ln -sf libkdb5.so.10.0 libkdb5.so )
( cd usr/lib ; rm -rf libkdb5.so.10 )
( cd usr/lib ; ln -sf libkdb5.so.10.0 libkdb5.so.10 )
( cd usr/lib ; rm -rf libkdb_ldap.so )
( cd usr/lib ; ln -sf libkdb_ldap.so.1.0 libkdb_ldap.so )
( cd usr/lib ; rm -rf libkdb_ldap.so.1 )
( cd usr/lib ; ln -sf libkdb_ldap.so.1.0 libkdb_ldap.so.1 )
( cd usr/lib ; rm -rf libkrad.so )
( cd usr/lib ; ln -sf libkrad.so.0.0 libkrad.so )
( cd usr/lib ; rm -rf libkrad.so.0 )
( cd usr/lib ; ln -sf libkrad.so.0.0 libkrad.so.0 )
( cd usr/lib ; rm -rf libkrb5.so )
( cd usr/lib ; ln -sf libkrb5.so.3.3 libkrb5.so )
( cd usr/lib ; rm -rf libkrb5.so.3 )
( cd usr/lib ; ln -sf libkrb5.so.3.3 libkrb5.so.3 )
( cd usr/lib ; rm -rf libkrb5.so.3.3 )
( cd usr/lib ; ln -sf ../../lib/libkrb5.so.3.3 libkrb5.so.3.3 )
( cd usr/lib ; rm -rf libkrb5support.so )
( cd usr/lib ; ln -sf libkrb5support.so.0.1 libkrb5support.so )
( cd usr/lib ; rm -rf libkrb5support.so.0 )
( cd usr/lib ; ln -sf libkrb5support.so.0.1 libkrb5support.so.0 )
( cd usr/lib ; rm -rf libkrb5support.so.0.1 )
( cd usr/lib ; ln -sf ../../lib/libkrb5support.so.0.1 libkrb5support.so.0.1 )
( cd usr/lib ; rm -rf libverto.so )
( cd usr/lib ; ln -sf libverto.so.0.0 libverto.so )
( cd usr/lib ; rm -rf libverto.so.0 )
( cd usr/lib ; ln -sf libverto.so.0.0 libverto.so.0 )
