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/amanda/3hole.ps.new
config etc/amanda/8.5x11.ps.new
config etc/amanda/DIN-A4.ps.new
config etc/amanda/DLT-A4.ps.new
config etc/amanda/DLT.ps.new
config etc/amanda/EXB-8500.ps.new
config etc/amanda/HP-DAT.ps.new
config etc/amanda/amanda-client-postgresql.conf.new
config etc/amanda/amanda-client.conf.new
config etc/amanda/amanda.conf.new
config etc/amanda/chg-multi.conf.new
config etc/amanda/chg-scsi.conf.new
config etc/amanda/disklist.new

( cd usr/doc/amanda-3.3.9 ; rm -rf COPYRIGHT )
( cd usr/doc/amanda-3.3.9 ; ln -sf ../../share/amanda/COPYRIGHT COPYRIGHT )
( cd usr/doc/amanda-3.3.9 ; rm -rf ChangeLog )
( cd usr/doc/amanda-3.3.9 ; ln -sf ../../share/amanda/ChangeLog ChangeLog )
( cd usr/doc/amanda-3.3.9 ; rm -rf NEWS )
( cd usr/doc/amanda-3.3.9 ; ln -sf ../../share/amanda/NEWS NEWS )
( cd usr/doc/amanda-3.3.9 ; rm -rf ReleaseNotes )
( cd usr/doc/amanda-3.3.9 ; ln -sf ../../share/amanda/ReleaseNotes ReleaseNotes )
( cd usr/doc/amanda-3.3.9 ; rm -rf example )
( cd usr/doc/amanda-3.3.9 ; ln -sf ../../share/amanda/example example )
( cd usr/doc/amanda-3.3.9 ; rm -rf template.d )
( cd usr/doc/amanda-3.3.9 ; ln -sf ../../share/amanda/template.d template.d )
( cd usr/lib64/amanda ; rm -rf libamanda.so )
( cd usr/lib64/amanda ; ln -sf libamanda-3.3.9.so libamanda.so )
( cd usr/lib64/amanda ; rm -rf libamandad.so )
( cd usr/lib64/amanda ; ln -sf libamandad-3.3.9.so libamandad.so )
( cd usr/lib64/amanda ; rm -rf libamar.so )
( cd usr/lib64/amanda ; ln -sf libamar-3.3.9.so libamar.so )
( cd usr/lib64/amanda ; rm -rf libamclient.so )
( cd usr/lib64/amanda ; ln -sf libamclient-3.3.9.so libamclient.so )
( cd usr/lib64/amanda ; rm -rf libamdevice.so )
( cd usr/lib64/amanda ; ln -sf libamdevice-3.3.9.so libamdevice.so )
( cd usr/lib64/amanda ; rm -rf libamglue.so )
( cd usr/lib64/amanda ; ln -sf libamglue-3.3.9.so libamglue.so )
( cd usr/lib64/amanda ; rm -rf libamserver.so )
( cd usr/lib64/amanda ; ln -sf libamserver-3.3.9.so libamserver.so )
( cd usr/lib64/amanda ; rm -rf libamxfer.so )
( cd usr/lib64/amanda ; ln -sf libamxfer-3.3.9.so libamxfer.so )
( cd usr/lib64/amanda ; rm -rf libndmjob.so )
( cd usr/lib64/amanda ; ln -sf libndmjob-3.3.9.so libndmjob.so )
( cd usr/lib64/amanda ; rm -rf libndmlib.so )
( cd usr/lib64/amanda ; ln -sf libndmlib-3.3.9.so libndmlib.so )
