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/lib/cups/backend ; rm -rf http )
( cd usr/lib/cups/backend ; ln -sf ipp http )
( cd usr/lib/cups/backend ; rm -rf https )
( cd usr/lib/cups/backend ; ln -sf ipp https )
( cd usr/lib/cups/backend ; rm -rf ipps )
( cd usr/lib/cups/backend ; ln -sf ipp ipps )
( cd usr/lib/cups/backend ; rm -rf smb )
( cd usr/lib/cups/backend ; ln -sf /usr/bin/smbspool smb )
( cd usr/lib ; rm -rf libcups.so )
( cd usr/lib ; ln -sf libcups.so.2 libcups.so )
( cd usr/lib ; rm -rf libcupsimage.so )
( cd usr/lib ; ln -sf libcupsimage.so.2 libcupsimage.so )
