# Clean up a potential upgrade mess caused by changing the
# installation directory to /usr/lib64/java/:
if [ -L usr/lib64/java ]; then
  rm -rf usr/lib64/java
  mkdir -p usr/lib64/java/man
  mkdir -p usr/lib64/java/lib/amd64/server
  mkdir -p usr/lib64/java/lib/amd64/client
  mkdir -p usr/lib64/java/javaws
  mkdir -p usr/lib64/java/bin
  mkdir -p usr/lib64/mozilla/plugins
fi
if [ -L ControlPanel ]; then
  rm -f ControlPanel
fi
if [ -L ja ]; then
  rm -f ja
fi
if [ -L javaws ]; then
  rm -f javaws
fi
if [ -L libjsig.so ]; then
  rm -f libjsig.so
fi
# End cleanup.
( cd usr/lib64/java ; rm -rf jre1.6.0_06 )
( cd usr/lib64/java ; ln -sf jre1.6.0_06 jre1.6.0_06 )
( cd usr/lib64/java/man ; rm -rf ja )
( cd usr/lib64/java/man ; ln -sf ja_JP.eucJP ja )
( cd usr/lib64/java/lib/amd64/server ; rm -rf libjsig.so )
( cd usr/lib64/java/lib/amd64/server ; ln -sf ../libjsig.so libjsig.so )
