#!/bin/sh

##Make it so config files are not overwritten
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...
}

## List of conf files to check.  The conf files in your package should end in .new
config etc/apache2/httpd.conf.new
config etc/apache2/ssl.conf.new
( cd usr/lib ; rm -rf libapr-0.so.0 )
( cd usr/lib ; ln -sf libapr-0.so.0.9.6 libapr-0.so.0 )
( cd usr/lib ; rm -rf libapr-0.so )
( cd usr/lib ; ln -sf libapr-0.so.0.9.6 libapr-0.so )
( cd usr/lib ; rm -rf libaprutil-0.so.0 )
( cd usr/lib ; ln -sf libaprutil-0.so.0.9.6 libaprutil-0.so.0 )
( cd usr/lib ; rm -rf libaprutil-0.so )
( cd usr/lib ; ln -sf libaprutil-0.so.0.9.6 libaprutil-0.so )
