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

  1. #!/sbin/sh
  2. #ident    "@(#)postinstall    1.6"
  3.  
  4. SCRIPTS=/usr/sbin/pkginst
  5.  
  6. ERR=/tmp/nuc.err
  7. CWD=/tmp/novell
  8. GREP="/usr/bin/grep"
  9. ADMINUSER="/usr/bin/adminuser"
  10.  
  11. PFMT1="The installation cannot be completed due to an error in the driver installation.  The file %s contains the errors.\n"
  12.  
  13. PKGMSG=uvlnuc
  14. LOCALE=${LC_ALL:-${LC_MESSAGES:-${LANG:-"C"}}}
  15.  
  16. if [ ! -f /usr/lib/locale/${LOCALE}/LC_MESSAGES/${PKGMSG} ]; then
  17.     if [ -f ${REQDIR}/inst/locale/${LOCALE}/${PKGMSG} -a \
  18.          -d /usr/lib/locale/${LOCALE}/LC_MESSAGES ]; then
  19.         cp ${REQDIR}/inst/locale/${LOCALE}/${PKGMSG} \
  20.            /usr/lib/locale/${LOCALE}/LC_MESSAGES
  21.     fi
  22. fi
  23.  
  24.  
  25. if [ ! -d ${CWD} ]
  26. then
  27.     pfmt -s error -g ${PKGMSG}:364 "No /tmp/novell.\n"
  28.     exit 1
  29. fi
  30.  
  31.  
  32. cd ${CWD}
  33. for i in `ls`
  34. do
  35.     cd ${i}
  36.     /etc/conf/bin/idinstall -k -P nuc -u ${i} > ${ERR} 2>&1
  37.     if [ $? -ne 0 ]
  38.     then
  39.         /etc/conf/bin/idinstall -k -P nuc -a ${i} > ${ERR} 2>&1
  40.         if [ $? -ne 0 ]
  41.         then
  42.             message `pfmt -s error -g ${PKGMSG}:365 "$PFMT1" "${ERR}"`
  43.             exit 1
  44.         fi
  45.     fi
  46.     cd ${CWD}
  47. done
  48.  
  49. rm -f ${ERR}
  50.  
  51. #    Set Single Login default to on.
  52. /usr/sbin/nwcm -q -s "netware_single_login=on"
  53. chmod 444 /etc/.slogin >/dev/null 2>&1
  54.  
  55. ###################################################
  56.         
  57.         
  58.  
  59. cd /
  60.  
  61. /etc/conf/bin/idbuild
  62.  
  63. while read a
  64. do
  65.     removef ${PKGINST} ${a}
  66. done <<EOT
  67. /tmp/novell/nuc/System /tmp/novell/nuc/Space.c /tmp/novell/nuc/Node /tmp/novell/nuc/Master /tmp/novell/nuc/Driver_atup.o
  68. /tmp/novell/nuc/Autotune /tmp/novell/nuc/Driver_mp.o /tmp/novell/nuc/Mtune /tmp/novell/nuc/Dtune
  69. /tmp/novell/nucfs/System /tmp/novell/nucfs/Space.c /tmp/novell/nucfs/Master /tmp/novell/nucfs/Driver_atup.o /tmp/novell/nucfs/Driver_mp.o
  70. /tmp/novell/nucam/System /tmp/novell/nucam/Space.c /tmp/novell/nucam/Master /tmp/novell/nucam/Driver_atup.o
  71. /tmp/novell/nucam/Driver_mp.o /tmp/novell/nucam/Mtune /tmp/novell/nucam/Dtune
  72. /tmp/novell/NWam/System /tmp/novell/NWam/Node /tmp/novell/NWam/Master /tmp/novell/NWam/Driver_atup.o /tmp/novell/NWam/Driver_mp.o
  73. /tmp/novell/climux/System /tmp/novell/climux/Node /tmp/novell/climux/Master /tmp/novell/climux/Driver_atup.o /tmp/novell/climux/Driver_mp.o
  74. /tmp /tmp/novell /tmp/novell/climux /tmp/novell/nuc /tmp/novell/nucam /tmp/novell/nucfs /tmp/novell/NWam
  75. EOT
  76.  
  77. # modify netconfig to add the nuc name resolver
  78. sed -e 's/^\(ipx[ \t][ \t]*.*[ \t][ \t]*\)\/usr\/lib\/novell_nwnet.so/\1\/usr\/lib\/novell.so/' \
  79. -e 's/^\(spx[ \t][ \t]*.*[ \t][ \t]*\)\/usr\/lib\/novell_nwnet.so/\1\/usr\/lib\/novell.so/' \
  80. /etc/netconfig >/tmp/nucnetconfig
  81. cp /tmp/nucnetconfig /etc/netconfig
  82.  
  83. removef -f ${PKGINST}
  84.  
  85. cd /
  86. rm -fr ${CWD}
  87.  
  88. . ${SCRIPTS}/updebug
  89. [ "$UPDEBUG" = "YES" ] && set -x
  90.  
  91. if [ "$PKGINSTALL_TYPE" != "NEWINSTALL" ]
  92. then
  93.         VER=`cat /etc/inst/save.user/${PKGINST}.ver 2>/dev/null`
  94.         if [ "x${VER}" = "x2.0" ]
  95.         then
  96.                 for RFILE in `cat /var/sadm/pkg/${PKGINST}/install/rem.files`
  97.                 do
  98.                         rm -rf ${RFILE}
  99.                 done
  100.  
  101.                 removef ${PKGINST} - < /var/sadm/pkg/${PKGINST}/install/rem.files >/dev/null 2>&1
  102.                 removef -f ${PKGINST}
  103.         fi
  104. fi
  105.  
  106. #
  107. # SCOADMIN
  108.  
  109. /usr/bin/scoadmin -p NetWare -f -c /usr/lib/scoadmin/NetWare/NetWare_Settings.obj
  110. #/usr/bin/scoadmin -p NetWare -f -c /usr/lib/scoadmin/NetWare/App_Sharing.obj
  111. #/usr/bin/scoadmin -p NetWare -f -c /usr/lib/scoadmin/NetWare/Launch_Application.obj
  112. #/usr/bin/scoadmin -p NetWare -f -c /usr/lib/scoadmin/NetWare/Remote_Apps.obj
  113.  
  114. exit 10
  115.  
  116.