home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 10 / mycd10.iso / share / linux / postinst.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1996-12-04  |  3.1 KB  |  117 lines

  1. #!/bin/sh
  2.  
  3. # $XFree86: xc/programs/Xserver/hw/xfree86/etc/postinst.sh,v 3.10 1996/10/24 12:31:06 dawes Exp $
  4. #
  5. # postinst.sh (for XFree86 3.2)
  6. #
  7. # This script should be run after installing a new version of XFree86.
  8. #
  9.  
  10. RUNDIR=/usr/X11R6
  11.  
  12. if [ ! -d $RUNDIR/. ]; then
  13.     echo $RUNDIR does not exist
  14.     exit 1
  15. fi
  16.  
  17. # Since the misc fonts are distributed in two parts, make sure that the
  18. # fonts.dir file is correct if only one part has been installed.
  19. if [ -d $RUNDIR/lib/X11/fonts/misc ]; then
  20.     echo ""
  21.     echo "Updating the fonts.dir file in $RUNDIR/lib/X11/fonts/misc"
  22.     echo "This might take a while ..."
  23.     $RUNDIR/bin/mkfontdir $RUNDIR/lib/X11/fonts/misc
  24. fi
  25.  
  26. # Check if the system has a termcap file
  27. TERMCAP1DIR=/usr/share
  28. TERMCAP2=/etc/termcap
  29. if [ -d $TERMCAP1DIR ]; then
  30.     TERMCAP1=`find $TERMCAP1DIR -type f -name termcap -print 2> /dev/null`
  31.     if [ x"$TERMCAP1" != x ]; then
  32.         TERMCAPFILE="$TERMCAP1"
  33.     fi
  34. else
  35.     if [ -f $TERMCAP2 ]; then
  36.         TERMCAPFILE="$TERMCAP2"
  37.     fi
  38. fi
  39. if [ x"$TERMCAPFILE" != x ]; then
  40.     echo ""
  41.     echo "You appear to have a termcap file: $TERMCAPFILE"
  42.     echo "This should be edited manually to replace the xterm entries"
  43.     echo "with those in $RUNDIR/lib/X11/etc/xterm.termcap"
  44.     echo ""
  45.     echo "Note: the new xterm entries are required to take full advantage"
  46.     echo "of new features, but they may cause problems when used with"
  47.     echo "older versions of xterm.  A terminal type 'xterm-r6' is included"
  48.     echo "for compatibility with the standard X11R6 version of xterm."
  49. fi
  50.  
  51. # Check for terminfo, and update the xterm entry
  52. TINFODIR=/usr/lib/terminfo
  53. OLDTINFO=" \
  54.     x/xterm \
  55.     x/xterms \
  56.     x/xterm-24 \
  57.     x/xterm-vi \
  58.     x/xterm-65 \
  59.     x/xterm-bold \
  60.     x/xtermm \
  61.     x/xterm-boldso \
  62.     x/xterm-ic \
  63.     x/xterm-r6 \
  64.     x/xterm-old \
  65.     x/xterm-r5 \
  66.     v/vs100"
  67.     
  68. if [ -d $TINFODIR ]; then
  69.     echo ""
  70.     echo "You appear to have a terminfo directory: $TINFODIR"
  71.     echo "New xterm terminfo entries can be installed now."
  72.     echo ""
  73.     echo "Note: the new xterm entries are required to take full advantage"
  74.     echo "of new features, but they may cause problems when used with"
  75.     echo "older versions of xterm.  A terminal type 'xterm-r6' is included"
  76.     echo "for compatibility with the standard X11R6 version of xterm."
  77.     echo ""
  78.     echo "Do you wish to have the new xterm terminfo entries installed now (y/n)?"
  79.     read Resp
  80.     case "$Resp" in
  81.     [yY]*)
  82.         echo ""
  83.         for t in $OLDTINFO; do
  84.             if [ -f $TINFODIR/$t ]; then
  85.                 echo "Moving old terminfo file $TINFODIR/$t to $TINFODIR/$t.bak"
  86.                 rm -f $TINFODIR/$t.bak
  87.                 mv -f $TINFODIR/$t $TINFODIR/$t.bak
  88.             fi
  89.         done
  90.         echo ""
  91.         echo "Installing new terminfo entries for xterm."
  92.         echo ""
  93.         echo "On some systems you may get warnings from tic about 'meml'"
  94.         echo "and 'memu'.  These warnings can safely be ignored."
  95.         echo ""
  96.         tic /usr/X11R6/lib/X11/etc/xterm.terminfo
  97.         ;;
  98.     *)
  99.         echo ""
  100.         echo "Not installing new terminfo entries for xterm."
  101.         echo "They can be installed later by running:"
  102.         echo ""
  103.         echo "  tic /usr/X11R6/lib/X11/etc/xterm.terminfo"
  104.         ;;
  105.     esac
  106. fi
  107.  
  108. case `uname` in
  109.     Linux|FreeBSD|NetBSD|OpenBSD)
  110.         echo ""
  111.         echo "You may need to reboot (or run ldconfig) before the"
  112.         echo "newly installed shared libraries can be used."
  113.         ;;
  114. esac
  115.  
  116. exit 0
  117.