#!/bin/sh
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...
}
config etc/rc.d/rc.saslauthd.new
( cd usr/lib/sasl2 ; rm -rf libotp.so.2 )
( cd usr/lib/sasl2 ; ln -sf libotp.so.2.0.23 libotp.so.2 )
( cd usr/lib/sasl2 ; rm -rf libdigestmd5.so.2 )
( cd usr/lib/sasl2 ; ln -sf libdigestmd5.so.2.0.23 libdigestmd5.so.2 )
( cd usr/lib/sasl2 ; rm -rf libotp.so )
( cd usr/lib/sasl2 ; ln -sf libotp.so.2.0.23 libotp.so )
( cd usr/lib/sasl2 ; rm -rf liblogin.so.2 )
( cd usr/lib/sasl2 ; ln -sf liblogin.so.2.0.23 liblogin.so.2 )
( cd usr/lib/sasl2 ; rm -rf libsasldb.so )
( cd usr/lib/sasl2 ; ln -sf libsasldb.so.2.0.23 libsasldb.so )
( cd usr/lib/sasl2 ; rm -rf libcrammd5.so.2 )
( cd usr/lib/sasl2 ; ln -sf libcrammd5.so.2.0.23 libcrammd5.so.2 )
( cd usr/lib/sasl2 ; rm -rf libplain.so )
( cd usr/lib/sasl2 ; ln -sf libplain.so.2.0.23 libplain.so )
( cd usr/lib/sasl2 ; rm -rf liblogin.so )
( cd usr/lib/sasl2 ; ln -sf liblogin.so.2.0.23 liblogin.so )
( cd usr/lib/sasl2 ; rm -rf libsasldb.so.2 )
( cd usr/lib/sasl2 ; ln -sf libsasldb.so.2.0.23 libsasldb.so.2 )
( cd usr/lib/sasl2 ; rm -rf libdigestmd5.so )
( cd usr/lib/sasl2 ; ln -sf libdigestmd5.so.2.0.23 libdigestmd5.so )
( cd usr/lib/sasl2 ; rm -rf libcrammd5.so )
( cd usr/lib/sasl2 ; ln -sf libcrammd5.so.2.0.23 libcrammd5.so )
( cd usr/lib/sasl2 ; rm -rf libplain.so.2 )
( cd usr/lib/sasl2 ; ln -sf libplain.so.2.0.23 libplain.so.2 )
( cd usr/lib ; rm -rf libsasl2.so )
( cd usr/lib ; ln -sf libsasl2.so.2.0.23 libsasl2.so )
( cd usr/lib ; rm -rf libsasl2.so.2 )
( cd usr/lib ; ln -sf libsasl2.so.2.0.23 libsasl2.so.2 )
