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

  1. #ident    "@(#)postinstall    1.2"
  2.  
  3. #    copyright    "%c%"
  4. #
  5. # Japanese Language Extension postinstall
  6. #
  7. LOCALE=ja
  8.  
  9. >/tmp/$PKGINST.ReMoVe
  10. >/tmp/$PKGINST.InStAlL
  11.  
  12. #
  13. # lp installation
  14. #
  15. USRSBIN=/usr/sbin
  16. LPFILTER=${USRSBIN}/lpfilter
  17. FDTMP=/etc/inst/locale/${LOCALE}/lp
  18.  
  19. if [ -x ${LPFILTER} ]
  20. then
  21.     if ls ${FDTMP}/*.fd > /tmp/FDLIST 2>/dev/null
  22.     then
  23.         while read fd
  24.         do
  25.                 filter=`expr "${fd}" : '.*/\([^/]*\)\.fd$'`
  26.                 ${LPFILTER} -f ${filter} -F ${fd} 2> /dev/null
  27.         done < /tmp/FDLIST
  28.  
  29.     cat /tmp/FDLIST >>/tmp/$PKGINST.ReMoVe
  30.         rm -f ${FDTMP}/*.fd
  31.     mv /tmp/FDLIST ${FDTMP}/FDLIST.ja
  32.     echo ${FDTMP}/FDLIST.ja >>/tmp/$PKGINST.InStAlL
  33.  
  34.     fi
  35. fi
  36.  
  37. #
  38. # remove postprint filter so that text2ps filter is used instead.
  39. # postprint will be restored in preremove
  40. #
  41. ${LPFILTER} -f postprint -x 2>/dev/null
  42.  
  43. #
  44. #  Find out if scoadmin have been already installed.  Install of
  45. #  scoadmin related pieces is slightly different in this case.
  46. #
  47. SCOADMIN=NO
  48.  
  49. /usr/bin/pkginfo -i scoadmin >/dev/null 2>&1 && SCOADMIN=YES
  50.  
  51. #
  52. # Install printer depended model file
  53. #
  54. JMODEL=/usr/lib/scoadmin/printer/model.stz.${LOCALE}
  55. MODEL=/usr/lib/scoadmin/printer/model.stz
  56.  
  57. [ "${SCOADMIN}" = "YES" ] &&  {
  58.     grep "^japan" $MODEL >/dev/null 2>&1 || \
  59.         echo "\n" | cat - ${JMODEL} >>${MODEL}
  60. }
  61.  
  62. # install scoadmin title files
  63. if [ -f /usr/bin/scoadmin ] 
  64. then
  65.     SCOADBIN=/usr/bin/scoadmin
  66.     SCOADDIR=/usr/lib/scoadmin
  67.     SCOTMP=/usr/lib/scoadmin/InStAlL
  68.  
  69.     $SCOADBIN -f -i $SCOADDIR/account/account.obj
  70.     $SCOADBIN -f -i $SCOADDIR/admsetup/admsetup.obj
  71.     $SCOADBIN -f -i $SCOADDIR/filesystem/filesystem.obj
  72.     $SCOADBIN -f -i $SCOADDIR/filesystem/filesystem.obj
  73.     $SCOADBIN -f -i $SCOADDIR/license/license.obj
  74.     $SCOADBIN -f -i $SCOADDIR/printer/printer.obj
  75.     $SCOADBIN -f -i $SCOADDIR/printjob/printjob.obj
  76.     $SCOADBIN -f -i $SCOADDIR/process/process.obj
  77.     $SCOADBIN -f -i $SCOADDIR/tasksched/tasksched.obj
  78.     $SCOADBIN -f -i $SCOADDIR/template/app.obj
  79.     $SCOADBIN -f -i /etc/mail/admin/mail.obj
  80.     $SCOADBIN -f -i /etc/mail/admin/mhome.obj
  81.     $SCOADBIN -H /usr/lib/netcfg/wansw -f -i $SCOADDIR/pic/pic.obj
  82.     $SCOADBIN -H /usr/lib/netcfg/wansw -f -i $SCOADDIR/ppp/ppp.obj
  83.  
  84.     $SCOADBIN -p "Software_Management" -f -i $SCOADDIR/appinst/appinst.obj
  85.  
  86.     $SCOADBIN -p Hardware -f -i $SCOADDIR/dcu/dcu.obj
  87.     $SCOADBIN -p Hardware -f -i $SCOADDIR/modem/modem.obj
  88.     $SCOADBIN -p Hardware -f -i $SCOADDIR/serial/serial.obj
  89.     $SCOADBIN -p Hardware -f -i /usr/lib/audio/audioconfig/audioconfig.obj
  90.     $SCOADBIN -p Hardware -f -i /usr/X/lib/vidconf/vidconfGUI.obj
  91.  
  92.     $SCOADBIN -p Networking -f -i $SCOADDIR/aas/aas.obj
  93.     $SCOADBIN -p Networking -f -i $SCOADDIR/dhcp/dhcp.obj
  94.     $SCOADBIN -p Networking -f -i $SCOADDIR/dns/dns.obj
  95.     $SCOADBIN -p Networking -f -i $SCOADDIR/ftp/ftp.obj
  96.     $SCOADBIN -p Networking -f -i $SCOADDIR/incoming/incoming.obj
  97.     $SCOADBIN -p Networking -f -i $SCOADDIR/ldap/ldap.obj
  98.     $SCOADBIN -p Networking -f -i $SCOADDIR/ncm/ncm.obj
  99.     $SCOADBIN -p Networking -f -i $SCOADDIR/netmgmt/netmgmt.obj
  100.     $SCOADBIN -p Networking -f -i $SCOADDIR/outgoing/outgoing.obj
  101.     $SCOADBIN -p Networking -f -i $SCOADDIR/pf/pf.obj
  102.     $SCOADBIN -p Networking -f -i $SCOADDIR/snmpmgr/snmpmgr.obj
  103.     $SCOADBIN -p Networking -f -i /usr/lib/netcfg/netcfg.obj
  104.  
  105.     $SCOADBIN -p System -f -i $SCOADDIR/defaults/defaults.obj
  106.     $SCOADBIN -p System -f -i $SCOADDIR/i18n/i18n.obj
  107.     $SCOADBIN -p System -f -i $SCOADDIR/reports/reports.obj
  108.     $SCOADBIN -p System -f -i $SCOADDIR/security/security.obj
  109.     $SCOADBIN -p System -f -i $SCOADDIR/shutdown/shutdown.obj
  110.     $SCOADBIN -p System -f -i $SCOADDIR/sysmonitor/sysmonitor.obj
  111.     $SCOADBIN -p System -f -i $SCOADDIR/sysstat/sysstat.obj
  112.     $SCOADBIN -p System -f -i $SCOADDIR/systemlogs/systemlogs.obj
  113.     $SCOADBIN -p System -f -i $SCOADDIR/systuner/systuner.obj
  114.     $SCOADBIN -p System -f -i $SCOADDIR/time/time.obj
  115.  
  116.     # installing scoadmin folder title files
  117.     $SCOADBIN -p Hardware -n $SCOTMP/Hardware/title.${LOCALE}
  118.     $SCOADBIN -p Networking -n $SCOTMP/Networking/title.${LOCALE}
  119.     $SCOADBIN -p Software_Management -n $SCOTMP/Software_Management/title.${LOCALE}
  120.     $SCOADBIN -p System -n $SCOTMP/System/title.${LOCALE}
  121. fi
  122.  
  123. ls ${SCOTMP}/* >> /tmp/$PKGINST.ReMoVe
  124.  
  125. cat /tmp/$PKGINST.ReMoVe | removef $PKGINST - 2>/dev/null
  126. [ -s /tmp/$PKGINST.ReMoVe ] && rm -rf `cat /tmp/$PKGINST.ReMoVe`
  127. rm /tmp/$PKGINST.ReMoVe
  128. removef -f $PKGINST
  129.  
  130. cat /tmp/$PKGINST.InStAlL | installf $PKGINST - 2>/dev/null
  131. rm /tmp/$PKGINST.InStAlL
  132. installf -f $PKGINST
  133.  
  134. exit 20        # System should be rebooted
  135.