home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / jdk113 / install / postinstall < prev    next >
Encoding:
Text File  |  1998-08-19  |  2.7 KB  |  107 lines

  1. #! /bin/sh
  2. #ident    "%W%"
  3. # the JDK is now installed in /opt/jdk-1.1.3
  4.  
  5. # first find out, what OS we are running on
  6. unset UNIXWARE
  7. unset OPENSERVER
  8.  
  9. OSREL=`uname -X | grep Release | cut -f3 -d" " | cut -c1-7` >/dev/null 2>&1
  10. # OSREL contains now 3.2v5.0.[024] or 4.2MP or ??? Gemini
  11. if [ $OSREL = "3.2v5.0" ]
  12. then
  13.     OPENSERVER=1
  14. else 
  15.     if    [ $OSREL = "4.2MP" ]
  16.     then
  17.         UNIXWARE=1
  18.     else
  19.         UNIXWARE=7
  20.     fi
  21. fi
  22.  
  23. # OpenServer have different directory structure
  24. # We also have to correct the symlinks that are created incorrectly
  25. # This is probably a bug with pkgadd on OpenServer
  26. if [ ! -z "$OPENSERVER" ]
  27. then
  28.     if [ ! -d /opt/K/SCO/JDK ]
  29.     then
  30.         ${DEBUG} mkdir -p /opt/K/SCO/JDK
  31.     fi
  32.     ${DEBUG} ln -s /opt/jdk-1.1.4 /opt/K/SCO/JDK/1.1.3
  33.     OLDWD=`pwd`
  34.     cd /opt/jdk-1.1.3/bin
  35.     ${DEBUG} rm -f IA32
  36.     ${DEBUG} ln -s x86at IA32
  37.     ${DEBUG} rm -f i386
  38.     ${DEBUG} ln -s x86at i386
  39.     ${DEBUG} rm -f java
  40.     ${DEBUG} ln -s .java_wrapper java
  41.     ${DEBUG} rm -f java_g
  42. #    ${DEBUG} ln -s .java_wrapper java_g
  43.     ${DEBUG} rm -f javac
  44.     ${DEBUG} ln -s .java_wrapper javac
  45. #    ${DEBUG} rm -f javac_g
  46. #    ${DEBUG} ln -s .java_wrapper javac_g
  47.     ${DEBUG} rm -f javah
  48.     ${DEBUG} ln -s .java_wrapper javah
  49. #    ${DEBUG} rm -f javah_g
  50. #    ${DEBUG} ln -s .java_wrapper javah_g
  51.     ${DEBUG} rm -f javap
  52.     ${DEBUG} ln -s .java_wrapper javap
  53. #    ${DEBUG} rm -f javap_g
  54. #    ${DEBUG} ln -s .java_wrapper javap_g
  55.     ${DEBUG} rm -f jdb
  56.     ${DEBUG} ln -s .java_wrapper jdb
  57.     cd /opt/jdk-1.1.3/lib
  58.     ${DEBUG} rm -f IA32
  59.     ${DEBUG} ln -s x86at IA32
  60.     ${DEBUG} rm -f i386
  61.     ${DEBUG} ln -s x86at i386
  62.     cd $OLDWD
  63.  
  64.     if [ -s /usr/java ]
  65.     then
  66.         rm -f /usr/java 
  67.         ${DEBUG} ln -s /opt/jdk-1.1.3 /usr/java
  68.     fi
  69. fi
  70.  
  71.  
  72. if [ ! -z "$UNIXWARE" ]
  73. then
  74.     # on Unixware and Gemini add link
  75.     ln -s /usr/X/lib/libXm.so.1.3 /opt/jdk-1.1.3/lib/x86at/green_threads > /dev/null 2>&1
  76. fi
  77.  
  78. # kavi; 
  79. # don't know if the final/official UnixWare 7 will have 5 or 7
  80. if [ "$UNIXWARE" = "1" ] 
  81. #if [ ! -z "$UNIXWARE" ]
  82. then 
  83.     # Unixware needs to tune virtual memory parameter
  84.     echo
  85.     echo "    You are running UnixWare 2.x."
  86.     echo "    If you want to run larger Java applications"
  87.     echo "    please tune the virtual memory parameters of "
  88.     echo "    your system by executing the following commands,"
  89.     echo "    which will set the virtual memory per process"
  90.     echo "    to unlimited size.  Then reboot your system."
  91.     echo
  92.     echo "    /etc/conf/bin/idtune -m ARG_MAX 65536"
  93.     echo "    /etc/conf/bin/idtune -m HVMMLIM 0x7FFFFFFF"
  94.     echo "    /etc/conf/bin/idtune -m HDATLIM 0x7FFFFFFF"
  95.     echo "    /etc/conf/bin/idtune -m SVMMLIM 0x7FFFFFFF"
  96.     echo "    /etc/conf/bin/idtune -m SDATLIM 0x7FFFFFFF"
  97.     echo "    /etc/conf/bin/idbuild"
  98. fi
  99.  
  100. echo
  101. echo "Installation finished successfully."
  102. echo "Now include /usr/java/bin in your PATH."
  103. echo "Have fun with Java!"
  104. echo
  105.  
  106. # ----------- END -----------
  107.