Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
10
cde/admin/IntegTools/updateTools/Imakefile
Normal file
10
cde/admin/IntegTools/updateTools/Imakefile
Normal file
@@ -0,0 +1,10 @@
|
||||
XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:08:02 drk $
|
||||
|
||||
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
|
||||
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
|
||||
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
|
||||
-Usun
|
||||
|
||||
AllTarget(updateCDE)
|
||||
|
||||
CppScriptTarget(updateCDE,updateCDE.src,$(LOCAL_CPP_DEFINES),)
|
||||
42
cde/admin/IntegTools/updateTools/kfork
Executable file
42
cde/admin/IntegTools/updateTools/kfork
Executable file
@@ -0,0 +1,42 @@
|
||||
#! /bin/ksh
|
||||
#
|
||||
# Shell script to kill off specified processes
|
||||
#
|
||||
# Usage: kfork <process-to-kill> <waiting time before retry>
|
||||
|
||||
# check for the optional 3rd parameter
|
||||
# it will tell how long to wait before
|
||||
# the next kill attempt
|
||||
if [ $# -ge 2 ]
|
||||
then
|
||||
die_time=$2
|
||||
else
|
||||
die_time=1
|
||||
fi
|
||||
|
||||
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
|
||||
if [ -s /tmp/tmp.$$ ]
|
||||
then
|
||||
awk '{print "kill", $1}' /tmp/tmp.$$ | /bin/csh
|
||||
sleep $die_time # wait for it to die
|
||||
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
|
||||
if [ -s /tmp/tmp.$$ ]
|
||||
then
|
||||
awk '{print "kill -3", $1}' /tmp/tmp.$$ | /bin/csh
|
||||
sleep $die_time # wait for it to die
|
||||
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
|
||||
if [ -s /tmp/tmp.$$ ]
|
||||
then
|
||||
awk '{print "kill -9", $1}' /tmp/tmp.$$ | /bin/csh
|
||||
fi
|
||||
rm /tmp/tmp.$$
|
||||
fi
|
||||
if [ -f /tmp/tmp.$$ ]
|
||||
then
|
||||
rm /tmp/tmp.$$
|
||||
fi
|
||||
fi
|
||||
if [ -f /tmp/tmp.$$ ]
|
||||
then
|
||||
rm /tmp/tmp.$$
|
||||
fi
|
||||
77
cde/admin/IntegTools/updateTools/kfork.dtclients
Executable file
77
cde/admin/IntegTools/updateTools/kfork.dtclients
Executable file
@@ -0,0 +1,77 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# Shell script to use kfork to kill all the desktop clients prior to
|
||||
# a clean install of new bits.
|
||||
#
|
||||
# Author: Jerrie Andreas 10/5/93
|
||||
#
|
||||
# Usage: No parameters, called from updateDT
|
||||
|
||||
|
||||
PS_ALL_FLAG=-e
|
||||
export PS_ALL_FLAG
|
||||
|
||||
TOOL_DIR=/x/cdesrc/admin/IntegTools/updateTools
|
||||
export TOOL_DIR
|
||||
|
||||
die_time=3
|
||||
|
||||
files="
|
||||
dtaction
|
||||
dtappgather
|
||||
dtappintegrate
|
||||
dtcalc
|
||||
dtcm
|
||||
dtcopy
|
||||
dtcreate
|
||||
dterror
|
||||
dtexec
|
||||
dtfile
|
||||
dtgreet
|
||||
dthello
|
||||
dthelpgen
|
||||
dthelptag
|
||||
dthelpview
|
||||
dticon
|
||||
dtksh
|
||||
dtlogin
|
||||
dtlpsetup
|
||||
dtmail
|
||||
dtmailconv
|
||||
dtpad
|
||||
dtprintegrate
|
||||
dtqueueinfo
|
||||
dtrc
|
||||
dtscreen
|
||||
dtsearchpath
|
||||
dtsession
|
||||
dtspcd
|
||||
dtstyle
|
||||
dtterm
|
||||
dtwm
|
||||
htag1
|
||||
htag2
|
||||
inetd
|
||||
list_queue_jobs
|
||||
list_queues
|
||||
rpc.cmsd
|
||||
rpc.ttdbserverd
|
||||
tt_type_comp
|
||||
ttcp
|
||||
ttdbck
|
||||
ttmv
|
||||
ttrm
|
||||
ttsession
|
||||
ttsnoop
|
||||
tttar
|
||||
tttrace
|
||||
uil
|
||||
"
|
||||
|
||||
for file in $files
|
||||
do
|
||||
$TOOL_DIR/kfork $file $die_time
|
||||
done
|
||||
|
||||
|
||||
|
||||
92
cde/admin/IntegTools/updateTools/updateCDE.ez
Executable file
92
cde/admin/IntegTools/updateTools/updateCDE.ez
Executable file
@@ -0,0 +1,92 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# updateCDE.ez
|
||||
#
|
||||
# Author:
|
||||
#
|
||||
# This script invokes the updateCDE script to do the actual work.
|
||||
# updateCDE.ez passes the path for the source tree to updateCDE and
|
||||
# thus to installCDE.
|
||||
#
|
||||
# Usage: updateCDE.ez -p <platform: hp|hpsh|ibm|sun>
|
||||
# or updateCDE.ez -p <platform> [-t <tarball destination directory>]
|
||||
#
|
||||
# Example: updateCDE.ez -p hp
|
||||
# updateCDE.ez -p hp -t /x/cde.save.tar
|
||||
|
||||
USAGE="Usage: updateCDE.ez -p <platform: hp|hpsh|ibm|sun> [-t <tarball location>]"
|
||||
PLATFORM=""
|
||||
TARBALL="no"
|
||||
PASS_THRUS=""
|
||||
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-p) echo "get the platform"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
echo $USAGE
|
||||
exit 1;
|
||||
}
|
||||
PLATFORM=$1
|
||||
shift;
|
||||
;;
|
||||
-t) echo "Where to put the tarball if "
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
echo $USAGE
|
||||
exit 1;
|
||||
}
|
||||
TARBALL="yes"
|
||||
TARBALL_LOCATION=$1
|
||||
shift;
|
||||
;;
|
||||
*) PASS_THRUS="$PASS_THRUS $1"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$PLATFORM" = "" ]
|
||||
then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
UPDATE=admin/IntegTools/updateTools/updateCDE
|
||||
|
||||
case $PLATFORM in
|
||||
hp) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_hp700_90/$UPDATE -s /x/cde_hp700_90 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
echo "/x/cde_hp700_90/$UPDATE -s /x/cde_hp700_90 $PASS_THRUS"
|
||||
/x/cde_hp700_90/$UPDATE -s /x/cde_hp700_90 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
hpsh) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_hp700_sh_90/$UPDATE -s /x/cde_hp700_sh_90 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
echo "/x/cde_hp700_sh_90/$UPDATE -s /x/cde_hp700_sh_90 $PASS_THRUS"
|
||||
/x/cde_hp700_sh_90/$UPDATE -s /x/cde_hp700_sh_90 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
sun) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_sun_52/$UPDATE -s /x/cde_sun_52 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
/x/cde_sun_52/$UPDATE -s /x/cde_sun_52 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
ibm) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_aix_32/$UPDATE -s /x/cde_aix_32 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
/x/cde_aix_32/$UPDATE -s /x/cde_aix_32 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
129
cde/admin/IntegTools/updateTools/updateCDE.src
Executable file
129
cde/admin/IntegTools/updateTools/updateCDE.src
Executable file
@@ -0,0 +1,129 @@
|
||||
XCOMM! /bin/ksh
|
||||
XCOMM $XConsortium: updateCDE.src /main/6 1996/04/23 11:10:35 drk $
|
||||
XCOMM
|
||||
XCOMM updateCDE or updateCDE.and.stomp.current.bits
|
||||
XCOMM
|
||||
XCOMM Jerrie Andreas 10/5/93
|
||||
XCOMM
|
||||
XCOMM This script kills any desktop "dt" clients that are currently running,
|
||||
XCOMM and then calls installCDE to install bits, passing all parameters to
|
||||
XCOMM installCDE. It then (on hp systems) changes run level to 5, the default
|
||||
XCOMM run level for starting the desktop.
|
||||
XCOMM
|
||||
XCOMM This script uses the same options as installCDE.
|
||||
XCOMM
|
||||
XCOMM Example: updateCDE -s /x/cde_hp700_90 -t /x/cde_savetars
|
||||
XCOMM
|
||||
XCOMM #########################################################################
|
||||
|
||||
#define HASH #
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Usage: updateCDE -s <source> [options]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" != "-s" ]
|
||||
then
|
||||
echo "First argument must be the -s option."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOURCE_TREE=$2
|
||||
|
||||
XCOMM Set which system we are on
|
||||
|
||||
BUILDSYSTEM=$(uname)
|
||||
|
||||
XCOMM Set system
|
||||
|
||||
if [ $BUILDSYSTEM = "AIX" ]
|
||||
then
|
||||
PLATFORM=aix
|
||||
elif [ $BUILDSYSTEM = "SunOS" ]
|
||||
then
|
||||
PLATFORM=sun
|
||||
elif [ $BUILDSYSTEM = "UNIX_SV" ]
|
||||
then
|
||||
PLATFORM=usl
|
||||
elif [ $BUILDSYSTEM = "UNIX_System_V" ]
|
||||
then
|
||||
PLATFORM=uxp
|
||||
elif [ $BUILDSYSTEM = "OSF1" ]
|
||||
then
|
||||
PLATFORM=dec
|
||||
else # Build system = HP
|
||||
PLATFORM=hp-ux
|
||||
fi
|
||||
|
||||
if [ $PLATFORM = "aix" ]
|
||||
then
|
||||
USER=`/bin/whoami`
|
||||
elif [ $PLATFORM = "sun" -o $PLATFORM = "uxp" ]
|
||||
then
|
||||
USER=`/usr/ucb/whoami`
|
||||
else
|
||||
USER=`/usr/bin/whoami`
|
||||
fi
|
||||
|
||||
if [ $USER != "root" ]
|
||||
then
|
||||
echo ""
|
||||
echo "You must be root to run this script"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "updateCDE: This script re-installs bits from the daily build trees."
|
||||
echo ""
|
||||
|
||||
sleep 2
|
||||
|
||||
PATH=/bin:/usr/bin:/etc:/usr/bin/X11:
|
||||
export PATH
|
||||
|
||||
XCOMM Change the run level to kill all dtlogins
|
||||
|
||||
if [ $PLATFORM = "hp-ux" ]
|
||||
then
|
||||
/etc/telinit 2
|
||||
elif [ $PLATFORM = "sun" ]
|
||||
then
|
||||
CDE_INSTALLATION_TOP/config/dtlogin.rc stop
|
||||
fi
|
||||
|
||||
TOOL_DIR=$SOURCE_TREE/admin/IntegTools/updateTools
|
||||
DB_TOOL_DIR=$SOURCE_TREE/admin/IntegTools/dbTools
|
||||
export TOOL_DIR DB_TOOL_DIR
|
||||
|
||||
|
||||
XCOMM kill any active Common Desktop Clients
|
||||
|
||||
echo "Stopping any Common Desktop Clients"
|
||||
$TOOL_DIR/kfork.dtclients
|
||||
$TOOL_DIR/kfork.dtclients
|
||||
|
||||
XCOMM Send all of the parameters to installDT
|
||||
|
||||
$DB_TOOL_DIR/installCDE $*
|
||||
|
||||
XCOMM Change run level to restart dtlogin
|
||||
|
||||
if [ $PLATFORM = "hp-ux" ];
|
||||
then
|
||||
/etc/telinit 5
|
||||
elif [ $PLATFORM = "sun" ]
|
||||
then
|
||||
CDE_INSTALLATION_TOP/config/dtlogin.rc start
|
||||
fi
|
||||
|
||||
echo "Done updating Common Desktop Bits."
|
||||
|
||||
echo "Updated Common Desktop Bits on: " > /etc/motd
|
||||
date >> /etc/motd
|
||||
echo "via the $TOOL_DIR/updateCDE script" >> /etc/motd
|
||||
echo "" >> /etc/motd
|
||||
|
||||
|
||||
XCOMM ################### eof #################
|
||||
Reference in New Issue
Block a user