home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- ######################################################################
- # Triteal Enterprise Desktop
- # (c) Copyright 1995 TriTeal Corporation
- # TEDdocs postremove
- # $Revision: 1.1.1.1 $
- ######################################################################
-
- ######################################################################
- # KillProc
- # $1 process
- ######################################################################
- KillProc()
- {
-
- ps -ef | fgrep $1 | grep -v grep >/tmp/killproc.$$
-
- if [ -s /tmp/killproc.$$ ]
- then
-
- awk '{print "kill " $2}' /tmp/killproc.$$ | /bin/sh 1>/dev/null
-
- sleep 2
-
- ps -ef | fgrep $1 | grep -v grep >/tmp/killproc.$$
-
- if [ -s /tmp/killproc.$$ ]
- then
-
- awk '{print "kill -TERM " $2}' /tmp/killproc.$$ | /bin/sh 1>/dev/null
-
- sleep 2
-
- ps -ef | fgrep $1 | grep -v grep >/tmp/killproc.$$
-
- if [ -s /tmp/killproc.$$ ]
- then
-
- awk '{print "kill -9 " $2}' /tmp/killproc.$$ | /bin/sh 1>/dev/null
-
-
- sleep 2
- fi
- fi
- fi
- rm -f /tmp/killproc.$$
- }
- ######################################################################
- # Usage
- ######################################################################
- Usage()
- {
-
- echo "Usage: `basename $0`"
-
- echo ""
- }
-
- ######################################################################
- # SyncInetD
- ######################################################################
- SyncInetD()
- {
- if [ -z "$TED_NO_EDIT_SYSFILES" ]; then
- # issue a SIGHUP to the inetd process
-
-
-
- ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
-
- if [ -s /tmp/tmppsout ]
- then
- $AWK '{print "kill -HUP " $2}' /tmp/tmppsout | /bin/sh
- else
-
- /usr/etc/inetd
-
- fi
- rm /tmp/tmppsout
-
- fi
- }
- ######################################################################
- # UpdateEtcAppConfigDirectory
- ######################################################################
- UpdateEtcAppConfigDirectory()
- {
- # a new locale has been installed. update /etc/dt
-
- APPCONFIG=appconfig
- # appconfig directories to update
- APPCONFIG_DIRS="appmanager help icons types"
-
- # make sure appconfig directory exists
- cd ${INSTALL_ROOT}$TED_CONFIG_TOP
- if [ ! -d $APPCONFIG ]
- then
- mkdir $APPCONFIG
- fi
- cd $APPCONFIG
-
- for i in $APPCONFIG_DIRS
- do
- # make sure appconfig subdirectory exists
- if [ ! -d $i ]
- then
- mkdir $i
- fi
- if [ -d ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i ]; then
- cd $i
-
- # for each locale in install area, update appconfig
- for j in ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i/*
- do
- subdir=`basename $j`
- if [ ! -d $subdir ]; then
-
- # check to see if the locale is a sym link and create sym link dir if it is
- if [ -h ${INSTALL_ROOT}$TED_TOP/$APPCONFIG/$i/$subdir ] ; then
- base_subdir=`echo $subdir | cut -f1 -d! | cut -f1 -d_ `
- ln -s $base_subdir $subdir
- else
- mkdir $subdir
- fi
-
- fi
- done
- cd ..
- fi
- done
- }
-
-
-
-
- ######################################################################
- # Main
- ######################################################################
-
-
-
-
- TED_TOP=/usr/dt
-
-
-
- TED_CONFIG_TOP=/etc/dt
- TED_TEMP_TOP=/var/dt
-
-
-
- if [ -z "$TED_TOP" ]; then
- echo "ERROR: TED_TOP is not set, exiting"
- exit 1;
- fi
-
-
-