#!/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 opt/kde/share/config/kdm/kdmrc.new

( cd opt/kde/bin ; rm -rf filesharelist )
( cd opt/kde/bin ; ln -sf fileshareset filesharelist )
( cd opt/kde/bin ; rm -rf kinfocenter )
( cd opt/kde/bin ; ln -sf kcontrol kinfocenter )
( cd opt/kde/lib ; rm -rf libkickermain.so.1 )
( cd opt/kde/lib ; ln -sf libkickermain.so.1.0.0 libkickermain.so.1 )
( cd opt/kde/lib ; rm -rf libkdecorations.so.1 )
( cd opt/kde/lib ; ln -sf libkdecorations.so.1.0.0 libkdecorations.so.1 )
( cd opt/kde/lib ; rm -rf libkonqsidebarplugin.so.1 )
( cd opt/kde/lib ; ln -sf libkonqsidebarplugin.so.1.2.0 libkonqsidebarplugin.so.1 )
( cd opt/kde/lib ; rm -rf libkateutils.so )
( cd opt/kde/lib ; ln -sf libkateutils.so.0.0.0 libkateutils.so )
( cd opt/kde/lib ; rm -rf libkateinterfaces.so.0 )
( cd opt/kde/lib ; ln -sf libkateinterfaces.so.0.0.0 libkateinterfaces.so.0 )
( cd opt/kde/lib ; rm -rf libkonqsidebarplugin.so )
( cd opt/kde/lib ; ln -sf libkonqsidebarplugin.so.1.2.0 libkonqsidebarplugin.so )
( cd opt/kde/lib ; rm -rf libkonq.so.4 )
( cd opt/kde/lib ; ln -sf libkonq.so.4.2.0 libkonq.so.4 )
( cd opt/kde/lib ; rm -rf libksplashthemes.so.0 )
( cd opt/kde/lib ; ln -sf libksplashthemes.so.0.0.0 libksplashthemes.so.0 )
( cd opt/kde/lib ; rm -rf libkateutils.so.0 )
( cd opt/kde/lib ; ln -sf libkateutils.so.0.0.0 libkateutils.so.0 )
( cd opt/kde/lib ; rm -rf libksgrd.so )
( cd opt/kde/lib ; ln -sf libksgrd.so.1.2.0 libksgrd.so )
( cd opt/kde/lib ; rm -rf libkickermain.so )
( cd opt/kde/lib ; ln -sf libkickermain.so.1.0.0 libkickermain.so )
( cd opt/kde/lib ; rm -rf libtaskmanager.so )
( cd opt/kde/lib ; ln -sf libtaskmanager.so.1.0.0 libtaskmanager.so )
( cd opt/kde/lib ; rm -rf libksgrd.so.1 )
( cd opt/kde/lib ; ln -sf libksgrd.so.1.2.0 libksgrd.so.1 )
( cd opt/kde/lib ; rm -rf libtaskbar.so.1 )
( cd opt/kde/lib ; ln -sf libtaskbar.so.1.2.0 libtaskbar.so.1 )
( cd opt/kde/lib ; rm -rf libtaskmanager.so.1 )
( cd opt/kde/lib ; ln -sf libtaskmanager.so.1.0.0 libtaskmanager.so.1 )
( cd opt/kde/lib ; rm -rf libtaskbar.so )
( cd opt/kde/lib ; ln -sf libtaskbar.so.1.2.0 libtaskbar.so )
( cd opt/kde/lib ; rm -rf libkateinterfaces.so )
( cd opt/kde/lib ; ln -sf libkateinterfaces.so.0.0.0 libkateinterfaces.so )
( cd opt/kde/lib ; rm -rf libkonq.so )
( cd opt/kde/lib ; ln -sf libkonq.so.4.2.0 libkonq.so )
( cd opt/kde/lib ; rm -rf libkdecorations.so )
( cd opt/kde/lib ; ln -sf libkdecorations.so.1.0.0 libkdecorations.so )
( cd opt/kde/lib ; rm -rf libksplashthemes.so )
( cd opt/kde/lib ; ln -sf libksplashthemes.so.0.0.0 libksplashthemes.so )
( cd opt/kde/share/doc/HTML/en/kdm ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kdm ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kate ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kate ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kxkb ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kxkb ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/ksysguard ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/ksysguard ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kdesu ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kdesu ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kfind ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kfind ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/klipper ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/klipper ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/konsole ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/konsole ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/faq ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/faq ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/quickstart ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/quickstart ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/glossary ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/glossary ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/khelpcenter ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/khelpcenter ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/userguide ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/userguide ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/visualdict ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/khelpcenter/visualdict ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kmenuedit ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kmenuedit ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kioslave ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kioslave ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kdm ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kdm ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/smb ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/smb ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/spellchecking ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/spellchecking ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/bell ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/bell ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/arts ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/arts ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/keys ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/keys ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/cookies ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/cookies ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/filetypes ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/filetypes ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/desktop ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/desktop ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/cache ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/cache ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/clock ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/clock ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/email ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/email ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/fonts ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/fonts ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/icons ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/icons ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/khtml ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/khtml ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/filemanager ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/filemanager ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/mouse ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/mouse ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/panel ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/panel ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/proxy ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/proxy ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/desktopbehavior ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/desktopbehavior ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/passwords ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/passwords ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/panelappearance ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/panelappearance ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/ebrowsing ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/ebrowsing ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/helpindex.html ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/helpindex.html ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/background ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/background ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmaccess ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmaccess ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/colors ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/colors ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/crypto ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/crypto ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/energy ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/energy ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmstyle ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmstyle ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/netpref ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/netpref ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmlaunch ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmlaunch ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmcss ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmcss ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmnotify ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmnotify ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmsmserver ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmsmserver ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/screensaver ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/screensaver ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/windowmanagement ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/windowmanagement ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kwindecoration ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kwindecoration ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmkonsole ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmkonsole ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/language ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/language ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/useragent ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/useragent ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/keyboard ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/keyboard ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmtaskbar ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmtaskbar ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmfontinst ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kcontrol/kcmfontinst ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kdeprint ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kdeprint ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kicker ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kicker ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kpager ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kpager ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kdebase-apidocs ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kdebase-apidocs ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kwrite ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kwrite ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/ksplashml ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/ksplashml ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kdebugdialog ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kdebugdialog ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/dma ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/dma ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/pci ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/pci ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/usb ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/usb ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/nics ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/nics ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/scsi ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/scsi ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/interrupts ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/interrupts ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/devices ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/devices ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/xserver ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/xserver ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/samba ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/samba ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/sound ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/sound ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/partitions ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/partitions ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/memory ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/memory ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/pcmcia ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/pcmcia ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/processor ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/processor ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/ioports ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/ioports ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/protocols ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/kinfocenter/protocols ; ln -sf /opt/kde/share/doc/HTML/en/common common )
( cd opt/kde/share/doc/HTML/en/konqueror ; rm -rf common )
( cd opt/kde/share/doc/HTML/en/konqueror ; ln -sf /opt/kde/share/doc/HTML/en/common common )
