Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
485
cde/admin/IntegTools/post_install/hp/configMin
Executable file
485
cde/admin/IntegTools/post_install/hp/configMin
Executable file
@@ -0,0 +1,485 @@
|
||||
#! /bin/ksh
|
||||
########
|
||||
# Product: CDE
|
||||
# Fileset: CDE-MIN
|
||||
# configure
|
||||
# @(#) $XConsortium: configMin /main/1 1995/09/15 17:48:04 cde-hp $
|
||||
########
|
||||
#
|
||||
# (c) Copyright Hewlett-Packard Company, 1993
|
||||
#
|
||||
########
|
||||
|
||||
|
||||
|
||||
PRODUCT=CDE
|
||||
FILESET=CDE-MIN
|
||||
DT_TEMP_TOP=/var/dt
|
||||
retval=0
|
||||
hostname=`hostname`
|
||||
DO_CONFIGURATION=""
|
||||
|
||||
|
||||
CreateVarDtDirectory()
|
||||
{
|
||||
if [ -x /bin/getcontext ]
|
||||
then
|
||||
if [ `/bin/getcontext | awk '{print $1}'` != "standalone" ]
|
||||
then
|
||||
base=${DT_TEMP_TOP%/*}
|
||||
if [ ! -d $base ]
|
||||
then
|
||||
mkdir -p $base
|
||||
fi
|
||||
if [ ! -d $DT_TEMP_TOP ]
|
||||
then
|
||||
|
||||
exec 3< /etc/clusterconf
|
||||
oldIFS=$IFS
|
||||
IFS=:
|
||||
CONTEXT=""
|
||||
while read -u3 lanid node name id num1 num2
|
||||
do
|
||||
if [ "$name" != "" ]
|
||||
then
|
||||
CONTEXT="$CONTEXT -c $name"
|
||||
fi
|
||||
done
|
||||
IFS=$oldIFS
|
||||
exec 3<&-
|
||||
|
||||
mkdir -p $DT_TEMP_TOP
|
||||
makecdf $CONTEXT $DT_TEMP_TOP
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
FixEtcServices()
|
||||
{
|
||||
FILE="/etc/services"
|
||||
TMPFILE="/tmp/etc-services"
|
||||
|
||||
#
|
||||
# check for existence of /etc/services
|
||||
#
|
||||
|
||||
if [ ! -f $FILE ] # highly unlikely
|
||||
then
|
||||
echo "" >$FILE
|
||||
fi
|
||||
|
||||
#
|
||||
# see if it already exists
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
print $0 > "/tmp/dtspc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/dtspc-already-there ]
|
||||
then
|
||||
echo "dtspc\t6112/tcp\t#subprocess control" >>$FILE
|
||||
else
|
||||
rm /tmp/dtspc-already-there
|
||||
fi
|
||||
|
||||
#
|
||||
# remove legacy entries like dtspcd
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspcd" || $1 == "#dtspcd")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
}
|
||||
|
||||
UnfixEtcServices()
|
||||
{
|
||||
FILE="/etc/services"
|
||||
TMPFILE="/tmp/etc-services"
|
||||
|
||||
awk '{if ($1 == "dtspc" && $2 == "6112/tcp")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
FixInetdDotConf()
|
||||
{
|
||||
FILE="/etc/inetd.conf"
|
||||
TMPFILE="/tmp/inetd.conf.$$"
|
||||
|
||||
#
|
||||
# check for existence of /etc/inetd.conf
|
||||
#
|
||||
|
||||
if [ ! -f $FILE ] # highly unlikely
|
||||
then
|
||||
echo "" >$FILE
|
||||
fi
|
||||
|
||||
awk '{if ($1 == "dtspc" || $1 == "dtspcd" || $1 == "#dtspcd")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $FILE $FILE.old
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
DTSPCD=/usr/dt/bin/dtspcd
|
||||
|
||||
echo "dtspc stream tcp nowait root $DTSPCD $DTSPCD -mount_point $DTMOUNTPOINT" >>$FILE
|
||||
}
|
||||
|
||||
UnfixInetdDotConf()
|
||||
{
|
||||
FILE="/etc/inetd.conf"
|
||||
TMPFILE="/tmp/inetd.conf"
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
FixInetdDotSec()
|
||||
{
|
||||
FILE="/usr/adm/inetd.sec"
|
||||
TMPFILE="/tmp/new-inetd.sec"
|
||||
|
||||
#
|
||||
# check for existence of /usr/adm/inetd.sec
|
||||
#
|
||||
|
||||
if [ ! -f $FILE ] # highly unlikely
|
||||
then
|
||||
echo "" >$FILE
|
||||
fi
|
||||
|
||||
#
|
||||
# remove legacy entries
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspcd")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
#
|
||||
# see if it already exists
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
print $0 > "/tmp/dtspc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/dtspc-already-there ]
|
||||
then
|
||||
echo "dtspc\tallow\t127.0.0.1\t$hostname" >>$FILE
|
||||
else
|
||||
status=`grep -q $hostname /tmp/dtspc-already-there`
|
||||
if [[ $status -ne 0 ]]
|
||||
then
|
||||
cat /tmp/dtspc-already-there >> $FILE
|
||||
awk -v hname=$hostname \
|
||||
'{if ($1 != "dtspc")
|
||||
print $0;
|
||||
else
|
||||
print $0 hname
|
||||
}' $FILE > $TMPFILE
|
||||
|
||||
mv $FILE ${FILE}.old
|
||||
mv $TMPFILE $FILE
|
||||
fi
|
||||
rm /tmp/dtspc-already-there
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
UnfixInetdDotSec()
|
||||
{
|
||||
FILE="/usr/adm/inetd.sec"
|
||||
TMPFILE="/tmp/new-inetd.sec"
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
RemoveMinFiles()
|
||||
{
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
rm -f $SRC
|
||||
dirname=${SRC%/*}
|
||||
if [ -d $dirname ]
|
||||
then
|
||||
cd $dirname
|
||||
while [ "$dirname" != "$CDE_TOP" ]
|
||||
do
|
||||
cd ..
|
||||
rmdir ${dirname##*/} >/dev/null 2>/dev/null
|
||||
dirname=${dirname%/*}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/copyright
|
||||
/usr/dt/lib/dtksh/DtFuncs.dtsh
|
||||
/usr/dt/bin/dtspcd
|
||||
/usr/dt/bin/dtappintegrate
|
||||
/usr/dt/bin/dtksh
|
||||
/usr/dt/bin/suid_exec
|
||||
/usr/dt/app-defaults/C/Dtksh
|
||||
/usr/dt/config/dtspcdenv
|
||||
/usr/dt/bin/dtexec
|
||||
EOF
|
||||
}
|
||||
|
||||
VerifyInstalledFiles()
|
||||
{
|
||||
echo "Status mode owner group filename"
|
||||
echo "-----------------------------------------"
|
||||
# exists correct correct correct /usr/dt/foo1
|
||||
# MISSING WRONG WRONG WRONG /usr/dt/foo2
|
||||
# exists the link is correct /usr/dt/link
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
if [ -L ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
touch /tmp/config-test
|
||||
chmod ${tokens[1]} /tmp/config-test
|
||||
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
|
||||
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
|
||||
|
||||
if [ "$tmpperms" = "$realperms" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
|
||||
|
||||
if [ "$owner" = "${tokens[4]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
group=`ls -l ${tokens[0]} | awk '{print $4}'`
|
||||
|
||||
if [ "$group" = "${tokens[5]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
|
||||
if [ "${tokens[2]}" = "$linkto" ]
|
||||
then
|
||||
echo " the link is correct \c"
|
||||
else
|
||||
echo " the link is WRONG \c"
|
||||
fi
|
||||
fi
|
||||
echo "${tokens[0]}"
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/copyright 0444 copyright file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/dtksh/DtFuncs.dtsh 0444 cde1/dtksh/DtFuncs.sh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtspcd 0555 cde1/dtspcd/dtspcd file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtappintegrate 0555 cde1/dtappintegrate/dtappintegrate file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtksh 0555 cde1/dtksh/dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/suid_exec 0555 cde1/dtksh/ksh93/bin/suid_exec file root bin di---- 378 cde_dt
|
||||
/usr/dt/app-defaults/C/Dtksh 0444 cde1/dtksh/Dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/config/dtspcdenv 0444 cde1/dtspcd/dtspcdenv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtexec 0555 cde1/dtexec/dtexec file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
}
|
||||
|
||||
ShowSize()
|
||||
{
|
||||
typeset -i total;
|
||||
let total=0
|
||||
|
||||
echo "Size\t\tfilename"
|
||||
echo "-----------------------------------------"
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
|
||||
echo "$filesize\t\t\c"
|
||||
echo "${tokens[0]}"
|
||||
let total=total+filesize
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/copyright 0444 copyright file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/dtksh/DtFuncs.dtsh 0444 cde1/dtksh/DtFuncs.sh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtspcd 0555 cde1/dtspcd/dtspcd file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtappintegrate 0555 cde1/dtappintegrate/dtappintegrate file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtksh 0555 cde1/dtksh/dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/suid_exec 0555 cde1/dtksh/ksh93/bin/suid_exec file root bin di---- 378 cde_dt
|
||||
/usr/dt/app-defaults/C/Dtksh 0444 cde1/dtksh/Dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/config/dtspcdenv 0444 cde1/dtspcd/dtspcdenv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtexec 0555 cde1/dtexec/dtexec file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
echo "Total fileset size is $total"
|
||||
}
|
||||
HandleOption()
|
||||
{
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-e) OPERATION="configure"
|
||||
shift;
|
||||
;;
|
||||
-d) OPERATION="deconfigure"
|
||||
shift;
|
||||
;;
|
||||
-v) OPERATION="verify"
|
||||
shift;
|
||||
;;
|
||||
-s) OPERATION="size"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Main body
|
||||
#
|
||||
#####################################################################
|
||||
|
||||
|
||||
HandleOption $*
|
||||
|
||||
if [ "$OPERATION" = "configure" ]
|
||||
then
|
||||
echo "Configuring for CDE-MIN"
|
||||
|
||||
FixEtcServices
|
||||
|
||||
#
|
||||
# source in /etc/src.sh to get the DTMOUNTPOINT value
|
||||
#
|
||||
|
||||
. /etc/src.sh
|
||||
|
||||
FixInetdDotConf
|
||||
|
||||
FixInetdDotSec
|
||||
|
||||
#
|
||||
# force inetd to reread its configuration file
|
||||
#
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
#
|
||||
# create the /var/dt/tmp directory for the dtspcd
|
||||
#
|
||||
|
||||
CreateVarDtDirectory
|
||||
|
||||
if [ ! -d /var/dt/tmp ]
|
||||
then
|
||||
mkdir -p /var/dt/tmp
|
||||
chmod -R 755 /var/dt/tmp
|
||||
fi
|
||||
|
||||
chmod 755 /usr/dt /etc/dt
|
||||
|
||||
elif [ "$OPERATION" = "deconfigure" ]
|
||||
then
|
||||
echo "de-Configuring CDE-MIN"
|
||||
|
||||
UnfixEtcServices
|
||||
|
||||
UnfixInetdDotConf
|
||||
|
||||
UnfixInetdDotSec
|
||||
|
||||
#
|
||||
# force inetd to reread its configuration file
|
||||
#
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
RemoveMinFiles
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "verify" ]
|
||||
then
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "size" ]
|
||||
then
|
||||
|
||||
ShowSize
|
||||
|
||||
fi
|
||||
|
||||
return $retval
|
||||
1006
cde/admin/IntegTools/post_install/hp/configRun
Executable file
1006
cde/admin/IntegTools/post_install/hp/configRun
Executable file
File diff suppressed because it is too large
Load Diff
246
cde/admin/IntegTools/post_install/hp/configShlibs
Executable file
246
cde/admin/IntegTools/post_install/hp/configShlibs
Executable file
@@ -0,0 +1,246 @@
|
||||
#! /bin/ksh
|
||||
########
|
||||
# Product: CDE
|
||||
# Fileset: CDE-SHLIBS
|
||||
# configure
|
||||
# $XConsortium: configShlibs /main/5 1996/06/13 15:47:42 drk $
|
||||
########
|
||||
#
|
||||
# (c) Copyright 1996 Digital Equipment Corporation.
|
||||
# (c) Copyright 1995,1996 Hewlett-Packard Company.
|
||||
# (c) Copyright 1996 International Business Machines Corp.
|
||||
# (c) Copyright 1996 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1996 Novell, Inc.
|
||||
# (c) Copyright 1996 FUJITSU LIMITED.
|
||||
# (c) Copyright 1996 Hitachi.
|
||||
#
|
||||
########
|
||||
|
||||
PROG_NAME=$0
|
||||
|
||||
CreateOneLink()
|
||||
{
|
||||
if [ -f $1.$2 ]; then
|
||||
rm -f $1
|
||||
ln -s $1.$2 $1
|
||||
else
|
||||
echo "$PROG_NAME: $1.$2 does not exist."
|
||||
echo " A symbolic link for this shared library will NOT be created."
|
||||
fi
|
||||
}
|
||||
|
||||
CreateSymLinks()
|
||||
{
|
||||
if [ -d /usr/dt/lib ]; then
|
||||
|
||||
cd /usr/dt/lib
|
||||
|
||||
CreateOneLink libDtHelp.sl 2.1
|
||||
CreateOneLink libDtPrint.sl 2.1
|
||||
CreateOneLink libDtMrm.sl 2.1
|
||||
CreateOneLink libDtSvc.sl 2.1
|
||||
CreateOneLink libDtWidget.sl 2.1
|
||||
CreateOneLink libDtTerm.sl 2.1
|
||||
CreateOneLink libtt.sl 2.1
|
||||
CreateOneLink libcsa.sl 2.1
|
||||
CreateOneLink libDtSearch.sl 2.1
|
||||
CreateOneLink libDtMmdb.sl 2.1
|
||||
|
||||
else
|
||||
echo "$PROG_NAME: /usr/dt/lib does not exist. Symbolic"
|
||||
echo " links for the shared libraries will NOT be created."
|
||||
fi
|
||||
}
|
||||
|
||||
VerifyInstalledFiles()
|
||||
{
|
||||
echo "Status mode owner group filename"
|
||||
echo "-----------------------------------------"
|
||||
# exists correct correct correct /usr/dt/foo1
|
||||
# MISSING WRONG WRONG WRONG /usr/dt/foo2
|
||||
# exists the link is correct /usr/dt/link
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
if [ -L ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
touch /tmp/config-test
|
||||
chmod ${tokens[1]} /tmp/config-test
|
||||
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
|
||||
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
|
||||
|
||||
if [ "$tmpperms" = "$realperms" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
|
||||
|
||||
if [ "$owner" = "${tokens[4]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
group=`ls -l ${tokens[0]} | awk '{print $4}'`
|
||||
|
||||
if [ "$group" = "${tokens[5]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
|
||||
if [ "${tokens[2]}" = "$linkto" ]
|
||||
then
|
||||
echo " the link is correct \c"
|
||||
else
|
||||
echo " the link is WRONG \c"
|
||||
fi
|
||||
fi
|
||||
echo "${tokens[0]}"
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib/libDtHelp.sl 0555 lib/DtHelp/libDtHelp.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtPrint.sl 0555 lib/DtPrint/libDtPrint.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMrm.sl 0555 lib/DtMrm/libDtMrm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSvc.sl 0555 lib/DtSvc/libDtSvc.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtWidget.sl 0555 lib/DtWidget/libDtWidget.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtTerm.sl 0555 lib/DtTerm/libDtTerm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libtt.sl 0555 lib/tt/lib/libtt.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libcsa.sl 0555 lib/csa/libcsa.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSearch.sl 0555 lib/DtSearch/libDtSearch.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMmdb.sl 0555 lib/DtMmdb/libDtMmdb.sl file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
}
|
||||
|
||||
ShowSize()
|
||||
{
|
||||
typeset -i total;
|
||||
let total=0
|
||||
|
||||
echo "Size\t\tfilename"
|
||||
echo "-----------------------------------------"
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
|
||||
echo "$filesize\t\t\c"
|
||||
echo "${tokens[0]}"
|
||||
let total=total+filesize
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib/libDtHelp.sl 0555 lib/DtHelp/libDtHelp.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtPrint.sl 0555 lib/DtPrint/libDtPrint.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMrm.sl 0555 lib/DtMrm/libDtMrm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSvc.sl 0555 lib/DtSvc/libDtSvc.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtWidget.sl 0555 lib/DtWidget/libDtWidget.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtTerm.sl 0555 lib/DtTerm/libDtTerm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libtt.sl 0555 lib/tt/lib/libtt.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libcsa.sl 0555 lib/csa/libcsa.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSearch.sl 0555 lib/DtSearch/libDtSearch.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMmdb.sl 0555 lib/DtMmdb/libDtMmdb.sl file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
echo "Total fileset size is $total"
|
||||
}
|
||||
HandleOption()
|
||||
{
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-e) OPERATION="configure"
|
||||
shift;
|
||||
;;
|
||||
-d) OPERATION="deconfigure"
|
||||
shift;
|
||||
;;
|
||||
-v) OPERATION="verify"
|
||||
shift;
|
||||
;;
|
||||
-s) OPERATION="size"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Main Body
|
||||
#
|
||||
#################################################################
|
||||
PRODUCT=CDE
|
||||
FILESET=CDE-SHLIBS
|
||||
retval=0
|
||||
|
||||
HandleOption $*
|
||||
|
||||
if [ "$OPERATION" = "configure" ]
|
||||
then
|
||||
|
||||
echo "Configuring for CDE-SHLIBS"
|
||||
|
||||
CreateSymLinks
|
||||
|
||||
elif [ "$OPERATION" = "deconfigure" ]
|
||||
then
|
||||
|
||||
echo "de-Configuring CDE-SHLIBS NOT supported!"
|
||||
|
||||
elif [ "$OPERATION" = "verify" ]
|
||||
then
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "size" ]
|
||||
then
|
||||
|
||||
ShowSize
|
||||
|
||||
fi
|
||||
|
||||
return $retval
|
||||
441
cde/admin/IntegTools/post_install/hp/configTT
Executable file
441
cde/admin/IntegTools/post_install/hp/configTT
Executable file
@@ -0,0 +1,441 @@
|
||||
#! /bin/ksh
|
||||
########
|
||||
# Product: CDE
|
||||
# Fileset: CDE-TT
|
||||
# configure
|
||||
# @(#) $XConsortium: configTT /main/2 1996/03/06 19:09:08 barstow $
|
||||
########
|
||||
#
|
||||
# (c) Copyright Hewlett-Packard Company, 1993
|
||||
#
|
||||
########
|
||||
|
||||
|
||||
|
||||
FixInetdDotConf()
|
||||
{
|
||||
FILE=/etc/inetd.conf
|
||||
TMPFILE=/tmp/inetd.conf
|
||||
|
||||
TTDBSERVERD=/usr/dt/bin/rpc.ttdbserver
|
||||
OLDTTDBSERVERD=/usr/dt/bin/rpc.ttdbserverd
|
||||
|
||||
awk -v ttdb=$TTDBSERVERD -v oldttdb=$OLDTTDBSERVERD '{
|
||||
if ($6 == ttdb || $6 == oldttdb)
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $FILE $FILE.old
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
echo "rpc stream tcp swait root $TTDBSERVERD 100083 1 $TTDBSERVERD -m /nfs/" >>$FILE
|
||||
}
|
||||
|
||||
|
||||
UnfixInetdDotConf()
|
||||
{
|
||||
FILE="/etc/inetd.conf"
|
||||
TMPFILE="/tmp/inetd.conf"
|
||||
TTDBSERVERD=/usr/dt/bin/rpc.ttdbserver
|
||||
|
||||
awk -v ttdb=$TTDBSERVERD \
|
||||
'{if ($7 == "100083" && $6 == ttdb)
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
awk '{if ($1 == "#cde") {
|
||||
$1 = $2;
|
||||
$2 = ""
|
||||
}
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
|
||||
FixEtcRpc()
|
||||
{
|
||||
FILE=/etc/rpc
|
||||
TMPFILE=/tmp/etc-rpc
|
||||
|
||||
if [ ! -f $FILE ]
|
||||
then
|
||||
echo "ttdbserver 100083" >$FILE
|
||||
else
|
||||
awk '{if ($1 == "ttdbserver" && $2 == "100083")
|
||||
print $0 > "/tmp/etc-rpc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/etc-rpc-already-there ]
|
||||
then
|
||||
awk '{if ($1 == "ttdbserver" || $2 == "100083")
|
||||
print $0 > "/tmp/etc-rpc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/etc-rpc-already-there ]
|
||||
then
|
||||
echo "ttdbserver 100083" >>$FILE
|
||||
else
|
||||
awk '{if ($1 == "ttdbserver" || $2 == "100083")
|
||||
print "#cde " $0; else print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
echo "ttdbserver 100083" >>$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
rm /tmp/etc-rpc-already-there
|
||||
fi
|
||||
else
|
||||
rm /tmp/etc-rpc-already-there
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
UnfixEtcRpc()
|
||||
{
|
||||
FILE="/etc/rpc"
|
||||
TMPFILE="/tmp/etc-rpc"
|
||||
|
||||
awk '{if ($1 == "ttdbserver" && $2 == "100083")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
awk '{if ($1 == "#cde") {
|
||||
$1 = $2;
|
||||
$2 = ""
|
||||
}
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
EstablishDtMountPoint()
|
||||
{
|
||||
FILE="/etc/src.sh"
|
||||
TMPFILE="/tmp/etcsrcsh.$$"
|
||||
|
||||
#
|
||||
# Ensure that the DTMOUNTPOINT environment variable will be set
|
||||
# when anybody logs in.
|
||||
#
|
||||
|
||||
if [[ -d /nfs && ! -d /net ]]
|
||||
then
|
||||
sed '/DTMOUNTPOINT=/d' $FILE >$TMPFILE
|
||||
|
||||
echo "DTMOUNTPOINT=/nfs/ ; export DTMOUNTPOINT" >>$TMPFILE
|
||||
|
||||
if [ ! -f ${FILE}.pre-cde ]
|
||||
then
|
||||
mv $FILE ${FILE}.pre-cde
|
||||
fi
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
fi
|
||||
}
|
||||
|
||||
DeestablishDtMountPoint()
|
||||
{
|
||||
FILE="/etc/src.sh"
|
||||
TMPFILE="/tmp/etc-src.sh"
|
||||
|
||||
if [ -f ${FILE}.pre-cde ]
|
||||
then
|
||||
mv ${FILE}.pre-cde $FILE
|
||||
else
|
||||
sed '/DTMOUNTPOINT=/d' $FILE >$TMPFILE
|
||||
mv $TMPFILE $FILE
|
||||
fi
|
||||
}
|
||||
|
||||
KillIt()
|
||||
{
|
||||
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
|
||||
if [ -s /tmp/tmppsout ]
|
||||
then
|
||||
awk '{print "kill " $2}' /tmp/tmppsout | /bin/ksh
|
||||
sleep 2
|
||||
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
|
||||
if [ -s /tmp/tmppsout ]
|
||||
then
|
||||
awk '{print "kill -TERM " $2}' /tmp/tmppsout | /bin/ksh
|
||||
sleep 2
|
||||
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
|
||||
if [ -s /tmp/tmppsout ]
|
||||
then
|
||||
awk '{print "kill -9 " $2}' /tmp/tmppsout | /bin/ksh
|
||||
sleep 2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm /tmp/tmppsout
|
||||
}
|
||||
|
||||
RemoveTTFiles()
|
||||
{
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
rm -f $SRC
|
||||
dirname=${SRC%/*}
|
||||
if [ -d $dirname ]
|
||||
then
|
||||
cd $dirname
|
||||
while [ "$dirname" != "$CDE_TOP" ]
|
||||
do
|
||||
cd ..
|
||||
rmdir ${dirname##*/} >/dev/null 2>/dev/null
|
||||
dirname=${dirname%/*}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/bin/rpc.ttdbserver
|
||||
/usr/dt/bin/rpc.ttdbserverd
|
||||
/usr/dt/bin/rpc.ttdbserverd
|
||||
/usr/dt/bin/tt_type_comp
|
||||
/usr/dt/bin/ttcp
|
||||
/usr/dt/bin/ttdbck
|
||||
/usr/dt/bin/ttmv
|
||||
/usr/dt/bin/ttrm
|
||||
/usr/dt/bin/ttrmdir
|
||||
/usr/dt/bin/ttsession
|
||||
/usr/dt/bin/tttrace
|
||||
/usr/dt/bin/tttar
|
||||
/usr/dt/bin/ttsnoop
|
||||
/usr/dt/lib/libtt.a
|
||||
/usr/dt/appconfig/tttypes/types.xdr
|
||||
EOF
|
||||
}
|
||||
|
||||
VerifyInstalledFiles()
|
||||
{
|
||||
echo "Status mode owner group filename"
|
||||
echo "-----------------------------------------"
|
||||
# exists correct correct correct /usr/dt/foo1
|
||||
# MISSING WRONG WRONG WRONG /usr/dt/foo2
|
||||
# exists the link is correct /usr/dt/link
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
if [ -L ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
touch /tmp/config-test
|
||||
chmod ${tokens[1]} /tmp/config-test
|
||||
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
|
||||
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
|
||||
|
||||
if [ "$tmpperms" = "$realperms" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
|
||||
|
||||
if [ "$owner" = "${tokens[4]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
group=`ls -l ${tokens[0]} | awk '{print $4}'`
|
||||
|
||||
if [ "$group" = "${tokens[5]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
|
||||
if [ "${tokens[2]}" = "$linkto" ]
|
||||
then
|
||||
echo " the link is correct \c"
|
||||
else
|
||||
echo " the link is WRONG \c"
|
||||
fi
|
||||
fi
|
||||
echo "${tokens[0]}"
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/bin/rpc.ttdbserver 0555 lib/tt/bin/ttdbserverd/rpc.ttdbserver file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tt_type_comp 0555 lib/tt/bin/tt_type_comp/tt_type_comp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttcp 0555 lib/tt/bin/shell/ttcp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttdbck 0555 lib/tt/bin/dbck/ttdbck file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttmv 0555 lib/tt/bin/shell/ttmv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrm 0555 lib/tt/bin/shell/ttrm file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrmdir 0444 /usr/dt/bin/ttrm sym_link bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsession 0555 lib/tt/bin/ttsession/ttsession file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttrace 0555 lib/tt/bin/tttrace/tttrace file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttar 0555 lib/tt/bin/tttar/tttar file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsnoop 0555 lib/tt/bin/ttsnoop/gui/ttsnoop file bin bin di---- 378 cde_dt
|
||||
/usr/dt/appconfig/tttypes/types.xdr 0444 cde1/tttypes/types.xdr file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
}
|
||||
|
||||
ShowSize()
|
||||
{
|
||||
typeset -i total;
|
||||
let total=0
|
||||
|
||||
echo "Size\t\tfilename"
|
||||
echo "-----------------------------------------"
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
|
||||
echo "$filesize\t\t\c"
|
||||
echo "${tokens[0]}"
|
||||
let total=total+filesize
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/bin/rpc.ttdbserver 0555 lib/tt/bin/ttdbserverd/rpc.ttdbserver file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tt_type_comp 0555 lib/tt/bin/tt_type_comp/tt_type_comp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttcp 0555 lib/tt/bin/shell/ttcp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttdbck 0555 lib/tt/bin/dbck/ttdbck file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttmv 0555 lib/tt/bin/shell/ttmv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrm 0555 lib/tt/bin/shell/ttrm file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrmdir 0444 /usr/dt/bin/ttrm sym_link bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsession 0555 lib/tt/bin/ttsession/ttsession file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttrace 0555 lib/tt/bin/tttrace/tttrace file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttar 0555 lib/tt/bin/tttar/tttar file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsnoop 0555 lib/tt/bin/ttsnoop/gui/ttsnoop file bin bin di---- 378 cde_dt
|
||||
/usr/dt/appconfig/tttypes/types.xdr 0444 cde1/tttypes/types.xdr file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
echo "Total fileset size is $total"
|
||||
}
|
||||
HandleOption()
|
||||
{
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-e) OPERATION="configure"
|
||||
shift;
|
||||
;;
|
||||
-d) OPERATION="deconfigure"
|
||||
shift;
|
||||
;;
|
||||
-v) OPERATION="verify"
|
||||
shift;
|
||||
;;
|
||||
-s) OPERATION="size"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Main Body
|
||||
#
|
||||
#################################################################
|
||||
PRODUCT=CDE
|
||||
FILESET=CDE-TT
|
||||
retval=0
|
||||
|
||||
HandleOption $*
|
||||
|
||||
if [ "$OPERATION" = "configure" ]
|
||||
then
|
||||
|
||||
echo "Configuring for CDE-TT"
|
||||
|
||||
FixInetdDotConf
|
||||
|
||||
FixEtcRpc
|
||||
|
||||
# After adding ToolTalk to the inetd service list the inet
|
||||
# daemon needs to reread its configuration.
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
EstablishDtMountPoint
|
||||
|
||||
elif [ "$OPERATION" = "deconfigure" ]
|
||||
then
|
||||
|
||||
echo "de-Configuring CDE-TT"
|
||||
|
||||
/etc/inetd -k
|
||||
KillIt "rpc.ttdbserver"
|
||||
/etc/inetd
|
||||
|
||||
UnfixInetdDotConf
|
||||
|
||||
UnfixEtcRpc
|
||||
|
||||
# After adding ToolTalk to the inetd service list the inet
|
||||
# daemon needs to reread its configuration.
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
DeestablishDtMountPoint
|
||||
|
||||
RemoveTTFiles
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "verify" ]
|
||||
then
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "size" ]
|
||||
then
|
||||
|
||||
ShowSize
|
||||
|
||||
fi
|
||||
|
||||
return $retval
|
||||
Reference in New Issue
Block a user