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

  1. #! /bin/sh
  2. # $Id: postinstall.src,v 1.4 1997/11/07 00:13:18 marye Exp $
  3. ######################################################################
  4. # Triteal Enterprise Desktop
  5. # (c) Copyright 1997 TriTeal Corporation
  6. #
  7. # TEDdesk postinstall
  8. ######################################################################
  9.  
  10.  
  11.  
  12. INSTALL_ROOT=""
  13.  
  14.  
  15. ######################################################################
  16. # KillProc
  17. #    $1 process 
  18. ######################################################################
  19. KillProc()
  20. {
  21.  
  22.    ps -ef | fgrep $1 | grep -v grep >/tmp/killproc.$$
  23.  
  24.     if [ -s /tmp/killproc.$$ ]
  25.     then
  26.  
  27.         awk '{print "kill " $2}' /tmp/killproc.$$ | /bin/sh 1>/dev/null
  28.  
  29.         sleep 2
  30.  
  31.         ps -ef | fgrep $1 | grep -v grep >/tmp/killproc.$$
  32.  
  33.         if [ -s /tmp/killproc.$$ ]
  34.         then
  35.  
  36.             awk '{print "kill -TERM " $2}' /tmp/killproc.$$ | /bin/sh 1>/dev/null
  37.  
  38.             sleep 2
  39.  
  40.             ps -ef | fgrep $1 | grep -v grep >/tmp/killproc.$$
  41.  
  42.             if [ -s /tmp/killproc.$$ ]
  43.             then
  44.  
  45.                 awk '{print "kill -9 " $2}' /tmp/killproc.$$ | /bin/sh 1>/dev/null
  46.  
  47.  
  48.                 sleep 2
  49.             fi
  50.         fi
  51.     fi
  52.     rm -f /tmp/killproc.$$
  53. }
  54. ######################################################################
  55. # Usage
  56. ######################################################################
  57. Usage()
  58. {
  59.  
  60. echo "Usage: `basename $0`"
  61.  
  62. echo ""
  63. }
  64.  
  65. ######################################################################
  66. # SyncInetD    
  67. ######################################################################
  68. SyncInetD()
  69. {
  70.    if [ -z "$TED_NO_EDIT_SYSFILES" ]; then
  71. # issue a SIGHUP to the inetd process
  72.  
  73.  
  74.  
  75.       ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
  76.  
  77.       if [ -s /tmp/tmppsout ]
  78.       then
  79.       $AWK '{print "kill -HUP " $2}' /tmp/tmppsout | /bin/sh
  80.       else
  81.  
  82.             /usr/etc/inetd
  83.  
  84.       fi
  85.       rm /tmp/tmppsout
  86.  
  87.    fi
  88. }
  89. ######################################################################
  90. # UpdateEtcAppConfigDirectory
  91. ######################################################################
  92. UpdateEtcAppConfigDirectory()
  93. {
  94. # a new locale has been installed.  update /etc/dt
  95.  
  96.    APPCONFIG=appconfig
  97. # appconfig directories to update
  98.    APPCONFIG_DIRS="appmanager help icons types"
  99.  
  100. # make sure appconfig directory exists
  101.    cd ${INSTALL_ROOT}$TED_CONFIG_TOP
  102.    if [ ! -d $APPCONFIG ]
  103.    then
  104.       mkdir $APPCONFIG
  105.    fi
  106.    cd $APPCONFIG
  107.  
  108.    for i in $APPCONFIG_DIRS
  109.    do
  110. # make sure appconfig subdirectory exists
  111.       if [ ! -d $i ]
  112.       then
  113.          mkdir $i
  114.       fi
  115.       if [ -d ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i ]; then
  116.      cd $i
  117.  
  118.     # for each locale in install area, update appconfig
  119.      for j in ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i/*
  120.      do
  121.             subdir=`basename $j`
  122.             if [ ! -d $subdir ]; then
  123.  
  124. # check to see if the locale is a sym link and create sym link dir if it is
  125.               if [ -h ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i/$subdir ] ; then
  126.                 base_subdir=`echo $subdir | cut -f1 -d! | cut -f1 -d_ `
  127.                 ln -s $base_subdir $subdir 
  128.               else
  129.                mkdir $subdir
  130.               fi
  131.  
  132.             fi
  133.      done
  134.      cd ..
  135.       fi
  136.    done
  137. }
  138.  
  139. # $Id: install.misc,v 1.1.1.1 1997/09/09 01:23:24 philip Exp $
  140. # Misc installation functions
  141.  
  142.  
  143.  
  144.  
  145. ######################################################################
  146. #
  147. # moveVendorCDELibs    
  148. #    looking at a package's pkglist, moves any library, whos target is
  149. #    /usr/dt/lib and already exists in /usr/dt/lib (vender's cde lib)
  150. #    and a link exists from the os's library dir to
  151. #    /usr/dt/lib/<library>, to the os's library dir.
  152. #
  153. # input:
  154. #    $1 - path and file name of pkglist for package to be installed
  155. #    $2 - os's library dir.
  156. #
  157. # output:
  158. #    moved libraries from /usr/dt/lib to os's library dir
  159. #
  160. # note:
  161. #    this should be called in every packages that installs libraries
  162. #    in /usr/dt/lib    
  163. #
  164. ######################################################################
  165. moveVendorCDELibs ( )
  166. {
  167.    pkglistFile="$1"
  168.    libDir="$2"
  169.  
  170.    while read entry type
  171.    do
  172. #
  173. # check for valid entry
  174. # check for target of /usr/dt/lib
  175. # check for file (as opposed to directory)
  176. # check for existance as a file in /usr/dt/lib
  177. # check for link in lib directory to /usr/dt/lib
  178. #
  179.       if [ -n "$entry" -a \
  180.            -n "$type" -a \
  181.            `echo $entry | \cut -f1 -d\/` = "lib" -a \
  182.            "$type" = "file" -a \
  183.            -f /usr/dt/$entry -a \
  184.            -h $libDir/$entry ]
  185.       then
  186. # check for entry really being a lib (begins with lib)
  187.          isALib="no"
  188.          isALib="`echo $entry | \cut -f2 -d\/ | \sed -e 's/^lib.*//g'`"
  189.          if [ -z "$isALib" ]
  190.          then
  191.             \mv /usr/dt/$entry $libDir/$entry
  192.          fi
  193.       fi
  194.    done < $pkglistFile
  195. }
  196.  
  197. INSTALL_ROOT=""
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207. ######################################################################
  208. # Misc USL functions    
  209. ######################################################################
  210. CheckForClobberedLinks()
  211. {
  212. if [ -z "$TED_NO_EDIT_SYSFILES" ]; then
  213. #
  214. # ensure links not clobbered
  215. #
  216.    for file in services inetd.conf
  217.    do
  218.       if [ ! -h /etc/$file ] ; then
  219.      if [ -f /etc/$file ]  ; then
  220.         rm /etc/$file
  221.         ln -s /etc/inet/$file /etc/$file
  222.      fi
  223.       fi
  224.    done
  225. fi
  226. }
  227.  
  228.  
  229.  
  230.  
  231.  
  232. ######################################################################
  233. # FixEtcRpc    
  234. ######################################################################
  235. FixEtcRpc()
  236. {
  237. if [ -z "$TED_NO_EDIT_SYSFILES" ]; then
  238.    TMPFILE=/tmp/etc-rpc
  239.  
  240.    if [ ! -f $RPC ]; then
  241. # if the file doesnot exist (highly unlikely), make one
  242.       echo "cmsd        100068    dtcalendar" >$RPC
  243.       echo "ttdbserverd    100083    tooltalk" >>$RPC
  244.    else
  245.       rm -f /tmp/etc-rpc-already-there
  246.       if [ ! -f ${RPC}.preTED ]; then
  247.          cp $RPC ${RPC}.preTED
  248.       fi
  249. # check to see if the cmsd entry is already there
  250.       $AWK '{
  251.       if ($1 == "cmsd" && $2 == "100068")
  252.           print $0 > "/tmp/etc-rpc-already-there"
  253.       }' $RPC >/dev/null
  254.       if [ ! -f /tmp/etc-rpc-already-there ]
  255.       then
  256. # if it is not, check to see if either item already exists
  257.       $AWK '{
  258.       if ($1 == "cmsd" || $2 == "100068")
  259.               print $0 > "/tmp/etc-rpc-already-there"
  260.       }' $RPC >/dev/null
  261. # if either one does they need to be commented out
  262.       if [ ! -f /tmp/etc-rpc-already-there ]
  263.       then
  264.           echo "cmsd        100068    dtcalendar" >>$RPC
  265.       else
  266.  
  267.               $AWK '{if ($2 == "100068" && $1 != "cmsd")
  268.  
  269.               print "#TED " $0; 
  270.             else 
  271.               print $0
  272.            }' $RPC >$TMPFILE
  273.  
  274.           echo "cmsd        100068    dtcalendar" >>/tmp/etc-rpc
  275.           cp $TMPFILE $RPC
  276.           rm -f $TMPFILE
  277.           
  278.           rm /tmp/etc-rpc-already-there
  279.       fi
  280.       else
  281.       rm /tmp/etc-rpc-already-there
  282.       fi
  283. # check to see if the entry is already there
  284.       rm -f /tmp/etc-rpc-already-there
  285.       $AWK '{if ($1 == "ttdbserverd" && $2 == "100083")
  286.           print $0 > "/tmp/etc-rpc-already-there"
  287.        }' $RPC >/dev/null
  288.  
  289.       if [ ! -f /tmp/etc-rpc-already-there ]
  290.       then
  291. # if it isnot, check to see if either term already exists
  292.       $AWK '{if ($1 == "ttdbserverd" || $2 == "100083")
  293.               print $0 > "/tmp/etc-rpc-already-there"
  294.            }' $RPC >/dev/null
  295.  
  296. # exists. If either one does they need to be commented out.
  297.  
  298.       if [ ! -f /tmp/etc-rpc-already-there ]
  299.       then
  300.          echo "ttdbserverd    100083    tooltalk" >>$RPC
  301.       else
  302.  
  303.           $AWK '{if ($2 == "100083" || $1 != "ttdbserverd")
  304.  
  305.               print "#TED " $0;
  306.         else
  307.               print $0
  308.            }' $RPC >$TMPFILE
  309.  
  310.       echo "ttdbserverd    100083    tooltalk" >>$TMPFILE
  311.       cp $TMPFILE $RPC
  312.       rm -f $TMPFILE
  313.       rm /tmp/etc-rpc-already-there
  314.       fi
  315.       else
  316.       rm /tmp/etc-rpc-already-there
  317.       fi
  318.    fi
  319.    chmod 644 $RPC
  320. else
  321.    echo "WARNING: did not modify $RPC"
  322. fi
  323. }
  324.  
  325. ######################################################################
  326. # AddCmsdToInetd    
  327. ######################################################################
  328. AddCmsdToInetd()
  329. {
  330.  
  331.    TMPFILE=/tmp/inetd.conf.cmsd.$$
  332.  
  333.  
  334.  
  335. # desired inetd.conf entry:
  336. # 100068/2-5 dgram rpc/udp wait root /usr/dt/bin/rpc.cmsd rpc.cmsd
  337.  
  338.  
  339.  
  340.  
  341. # first make an awk script and put it in a file. The awk script
  342. # checks for rpc.cmsd AND that it is the TED version
  343.  
  344. # get rid of legacy entry
  345.  
  346.    $AWK '{
  347.       if ($1 == "#TED" && $7 == "/usr/dt/bin/rpc.cmsd")
  348.          ;
  349.       else
  350.          print $0
  351.       }' $INETD_CONF >$TMPFILE
  352.  
  353.  
  354.     cp $TMPFILE $INETD_CONF
  355.     rm -f $TMPFILE
  356.  
  357.  
  358. # comment out any non-TED rpc.cmsd lines
  359.  
  360.  
  361.  
  362.  
  363.    $AWK '{if ($1 ~ "100068/" && $6 != "/usr/dt/bin/rpc.cmsd")
  364.          print "#TED " $0;
  365.        else
  366.          print $0
  367.       }' $INETD_CONF >$TMPFILE
  368.  
  369.     cp $TMPFILE $INETD_CONF
  370.     rm -f $TMPFILE
  371.  
  372.  
  373.  
  374.  
  375. # remove any TED 2-4 cmsd
  376.  
  377.  
  378.  
  379.  
  380.    $AWK '{
  381.       if ($1 == "100068/2-4" && $6 == "/usr/dt/bin/rpc.cmsd" )
  382.         ;
  383.       else
  384.         print $0
  385.       }' $INETD_CONF >$TMPFILE
  386.  
  387.  
  388.  
  389.  
  390.     cp $TMPFILE $INETD_CONF
  391.     rm -f $TMPFILE
  392.  
  393. # now run an awk script to see if there is an occurrence of 2-5 cmsd
  394.  
  395.  
  396.  
  397.  
  398.    $AWK  '{
  399.       if ($6 == "/usr/dt/bin/rpc.cmsd" && $1 == "100068/2-5")
  400.          print $0 > "/tmp/cmsd-already-there"
  401.       }' $INETD_CONF >/dev/null
  402.  
  403.  
  404.  
  405.  
  406. # if it is not there, add it
  407.  
  408.     if [ ! -f /tmp/cmsd-already-there ]; then
  409.  
  410.  
  411.  
  412.         echo "100068/2-5 dgram rpc/udp wait root /usr/dt/bin/rpc.cmsd rpc.cmsd" >>$INETD_CONF
  413.  
  414.  
  415.  
  416.     else
  417.     rm /tmp/cmsd-already-there
  418.     fi
  419.  
  420. }
  421.  
  422. ######################################################################
  423. # AddDtspcdToInetd    
  424. ######################################################################
  425. AddDtspcdToInetd()
  426. {
  427.  
  428.    TMPFILE=/tmp/inetd.conf.dtspcd.$$
  429. # desired inetd.conf entry:
  430. # "dtspc stream tcp nowait root /usr/dt/bin/dtspcd dtspcd
  431.  
  432. # get rid of legacy entry
  433.  
  434.    $AWK '{if ($1 == "dtspc" && $6 == "/usr/dt/bin/dtspcd")
  435.          ;
  436.       else
  437.          print $0
  438.       }' $INETD_CONF >$TMPFILE
  439.     cp $TMPFILE $INETD_CONF
  440.     rm -f $TMPFILE
  441.     
  442. # Now add the dtspc line
  443.  
  444.    echo "dtspc stream tcp nowait root /usr/dt/bin/dtspcd dtspcd" >>$INETD_CONF
  445.  
  446.  
  447. }
  448. ######################################################################
  449. # AddTtdbToInetd    
  450. ######################################################################
  451. AddTtdbToInetd()
  452. {
  453. TMPFILE=/tmp/inetd.conf.ttdb.$$
  454.  
  455.  
  456.   /usr/sbin/pmadm -d -p tcp -s ttdbserverd >/dev/null 2>&1
  457.   /usr/sbin/pmadm -r -p tcp -s ttdbserverd >/dev/null 2>&1
  458.  
  459.  
  460.   /usr/sbin/pmadm -a -p tcp -s ttdbserverd -i root \
  461.       -m `/usr/sbin/nlsadmin -c /usr/dt/bin/rpc.ttdbserverd \
  462.       -D -R 100083:1` -v `/usr/sbin/nlsadmin -V`
  463.  
  464.   /usr/sbin/sacadm -x -p tcp
  465.  
  466. }
  467.  
  468. ######################################################################
  469. # FixInetdDotConf    
  470. ######################################################################
  471. FixInetdDotConf()
  472. {
  473. if [ -z "$TED_NO_EDIT_SYSFILES" ]; then
  474.    if [ ! -f $INETD_CONF ]; then
  475.        echo "" >$INETD_CONF
  476.    fi
  477.  
  478.    if [ ! -f ${INETD_CONF}.preTED ]; then
  479.       cp $INETD_CONF ${INETD_CONF}.preTED  
  480.    fi
  481.  
  482.    AddCmsdToInetd
  483.  
  484.    AddDtspcdToInetd
  485.    AddTtdbToInetd
  486.    chmod 644 $INETD_CONF
  487. else
  488.    echo "WARNING: did not modify $INETD_CONF"
  489. fi
  490. }
  491.  
  492. ######################################################################
  493. # FixEtcServices    
  494. ######################################################################
  495. FixEtcServices()
  496. {
  497. if [ -z "$TED_NO_EDIT_SYSFILES" ]; then
  498.    TMPFILE=/tmp/tmp.services.$$
  499.    if [ ! -f ${SERVICES}.preTED ]; then
  500.       cp $SERVICES ${SERVICES}.preTED  
  501.    fi
  502.  
  503. #
  504. # check for existence of $SERVICES
  505. #
  506.    if [ ! -f $SERVICES ]; then    # highly unlikely
  507.        echo "" >$SERVICES
  508.    fi
  509.  
  510.  
  511. #
  512. # remove legacy entries like dtspcd
  513. #
  514.    $AWK '{
  515.       if ($1 == "dtspcd" || $1 == "#dtspcd")
  516.          ;
  517.        else
  518.          print $0
  519.       }' $SERVICES >$TMPFILE
  520.  
  521.    cp $TMPFILE $SERVICES
  522.    rm -f $TMPFILE
  523. #
  524. # see if it already exists
  525. #
  526.    $AWK '{
  527.       if ($1 == "dtspc")
  528.          print $0 > "/tmp/dtspc-already-there"
  529.       }' $SERVICES >/dev/null
  530.  
  531.    if [ ! -f /tmp/dtspc-already-there ]; then
  532.        echo "dtspc        6112/tcp    # subprocess control" >>$SERVICES
  533.    else
  534.        rm /tmp/dtspc-already-there
  535.    fi
  536.    chmod 644 $SERVICES
  537.  
  538. else
  539.    echo "WARNING: did not modify $SERVICES"
  540. fi
  541. }
  542.  
  543. ######################################################################
  544. # CreateEtcAppConfigDirectory    
  545. ######################################################################
  546. CreateEtcAppConfigDirectory()
  547. {
  548.    APPCONFIG=appconfig
  549.    APPCONFIG_DIRS="appmanager help icons types"
  550. #
  551. # Create the APPCONFIG directory inside TED_CONFIG_TOP and create
  552. # all of its subdirectories
  553. #
  554.    cd ${INSTALL_ROOT}$TED_CONFIG_TOP
  555.    if [ ! -d $APPCONFIG ]; then
  556.        mkdir $APPCONFIG
  557.    fi
  558.  
  559.    cd $APPCONFIG
  560.  
  561.    for i in $APPCONFIG_DIRS
  562.    do
  563.       if [ ! -d $i ]; then
  564.       mkdir $i
  565.       fi
  566.       if [ -d ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i ]; then
  567.          cd $i
  568.     #
  569.     # for each locale
  570.     #
  571.      for j in ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i/*
  572.      do
  573.          subdir=`basename $j`
  574.          if [ ! -d $subdir ]; then
  575.          mkdir $subdir
  576.          fi
  577.      done
  578.      cd ..
  579.       fi
  580.    done
  581. }
  582.  
  583.  
  584.  
  585.  
  586.  
  587. ######################################################################
  588. # CreateVarDtDir    
  589. ######################################################################
  590. CreateVarDtDir()
  591. {
  592.    APPCONFIG=appconfig
  593. # create the /var/dt directory
  594. #
  595.    if [ -h ${INSTALL_ROOT}$TED_TEMP_TOP ] ; then
  596.        rm ${INSTALL_ROOT}$TED_TEMP_TOP 
  597.    fi
  598.    if [ ! -d ${INSTALL_ROOT}$TED_TEMP_TOP ]; then
  599.      mkdir -p ${INSTALL_ROOT}$TED_TEMP_TOP
  600.      if [ ! -d ${INSTALL_ROOT}$TED_TEMP_TOP/$APPCONFIG/appmanager ]; then
  601.          mkdir -p ${INSTALL_ROOT}$TED_TEMP_TOP/$APPCONFIG/appmanager
  602.      fi
  603.     # sanity check
  604.      if [ "$TED_TEMP_TOP" != "/" ]; then
  605.         chmod -R 777  ${INSTALL_ROOT}$TED_TEMP_TOP/*
  606.         chown -R root ${INSTALL_ROOT}$TED_TEMP_TOP/*
  607.         chgrp -R bin  ${INSTALL_ROOT}$TED_TEMP_TOP/*
  608.      fi
  609.    else
  610.       if [ ! -d ${INSTALL_ROOT}$TED_TEMP_TOP/$APPCONFIG/appmanager ]; then
  611.          mkdir -p ${INSTALL_ROOT}$TED_TEMP_TOP/$APPCONFIG/appmanager
  612.       fi
  613.    fi
  614. #
  615. #  create the /var/dt/tmp directory for the dtspcd
  616. #
  617.    if [ ! -d ${INSTALL_ROOT}$TED_TEMP_TOP/tmp ]; then
  618.        mkdir -p ${INSTALL_ROOT}$TED_TEMP_TOP/tmp
  619.    fi
  620.  
  621. }
  622. ######################################################################
  623. # CreateEtcDtDir    
  624. ######################################################################
  625. CreateEtcDtDir()
  626. {
  627.  
  628. #
  629. # create /etc/dt and its config directory
  630. #
  631.    if [ -h ${INSTALL_ROOT}$TED_CONFIG_TOP ] ; then
  632.            rm ${INSTALL_ROOT}$TED_CONFIG_TOP
  633.    fi
  634.    if [ ! -d ${INSTALL_ROOT}$TED_CONFIG_TOP ]; then
  635.       mkdir -p ${INSTALL_ROOT}$TED_CONFIG_TOP
  636.    fi
  637.  
  638.    if [ ! -d ${INSTALL_ROOT}$TED_CONFIG_TOP/config ]; then
  639.       mkdir -p ${INSTALL_ROOT}$TED_CONFIG_TOP/config
  640.    fi
  641.  
  642. #
  643. # Configure Xsession.d
  644. #
  645.    cd ${INSTALL_ROOT}$TED_CONFIG_TOP/config
  646.    if [ ! -d Xsession.d ]; then
  647.        mkdir Xsession.d
  648.    fi
  649.  
  650.    if [ ! -z "$TED_CONFIG_TOP" ]; then
  651. # sanity check
  652.       if [ "$TED_CONFIG_TOP" != "/" ]; then
  653.          chmod -R 755 ${INSTALL_ROOT}$TED_CONFIG_TOP\/*
  654.       fi
  655.    fi
  656.  
  657. #
  658. # make sure /etc/dt/appconfig exists
  659. #
  660.    CreateEtcAppConfigDirectory
  661. }
  662. ######################################################################
  663. # Main    
  664. ######################################################################
  665.  
  666.   SERVICES=/etc/inet/services
  667.   INETD_CONF=/etc/inet/inetd.conf
  668.  
  669.   RPC=${INSTALL_ROOT}/etc/rpc
  670.  
  671.  
  672.   AWK=nawk
  673.  
  674.  
  675.  
  676.  
  677.  
  678.   TED_TOP=$TED_DIR
  679.  
  680.  
  681.  
  682.   TED_CONFIG_TOP=/etc/dt
  683.   TED_TEMP_TOP=/var/dt
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690. if [ -z "$TED_TOP" ]; then
  691.    echo "ERROR TED_TOP not set, exiting"
  692.    exit 1;
  693. fi
  694.  
  695.  
  696.  
  697.   CheckForClobberedLinks
  698.  
  699.  
  700.  
  701. if [ -z "$SHAREDINSTALL" ]; then
  702. # Link the installed files to /usr/dt (if needed)
  703.         TestDir=`echo $TED_TOP | sed -e 's|//*|/|g' -e 's|/$||'`
  704.         if [ "$TestDir" != "/usr/dt" ] ; then
  705.  
  706.  
  707.               installf TEDdesk /usr/dt=$TED_TOP s
  708.  
  709.            if [ -f ${INSTALL_ROOT}/usr/dt ] ; then
  710.               mv ${INSTALL_ROOT}/usr/dt ${INSTALL_ROOT}/usr/dt.preTED
  711.            fi
  712.            rm -f ${INSTALL_ROOT}/usr/dt
  713.            ln -s $TED_TOP ${INSTALL_ROOT}/usr/dt
  714.  
  715.         else
  716.               installf TEDdesk /usr/dt
  717.  
  718.         fi
  719. fi
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728. # stop any running TED programs
  729. KillProc "rpc.cmsd"
  730. KillProc "rpc.ttdbserverd"
  731. KillProc "dtspcd"
  732. KillProc "dtlogin"
  733. KillProc "dtsession"
  734.  
  735.  
  736. PRINTERS=""
  737. DEFAULT_PRINTER="DtPrint"
  738.  
  739. CreateVarDtDir
  740. CreateEtcDtDir
  741.  
  742.  
  743.  
  744. FixEtcRpc
  745. FixEtcServices
  746. FixInetdDotConf
  747.  
  748.  
  749.  
  750.  
  751. #
  752. # ConfigurePrintersDir
  753. #
  754. if [ -z "$TED_NO_EDIT_SYSFILES" -a -x $TED_TOP/bin/dtprintinfo ]; then
  755.  
  756.  
  757.    env LANG=C ${INSTALL_ROOT}$TED_TOP/bin/dtprintinfo -populate
  758.  
  759.  
  760. else
  761.    echo "WARNING: /etc/dt printer information files not created"
  762. fi
  763.  
  764.  
  765. # sync inetd with our changes
  766. SyncInetD
  767.  
  768.  
  769.  
  770.  
  771. if [ -z "$SHAREDINSTALL" ]; then
  772. # Let the pkg routines know about our file system changes
  773.    installf -f TEDdesk
  774. fi
  775.  
  776.  
  777.