remove OSF1 support

This commit is contained in:
chase
2018-05-24 14:50:03 -05:00
committed by Jon Trulson
parent 3c1736f077
commit 164e695cd0
325 changed files with 290 additions and 9980 deletions

View File

@@ -40,10 +40,6 @@ SUBDIRS = ibm
PLATFORM = sun
SUBDIRS = sun
#endif
#ifdef AlphaArchitecture
PLATFORM = dec
SUBDIRS = dec
#endif
#ifndef HPArchitecture
MakeSubdirs($(SUBDIRS))

View File

@@ -1,53 +0,0 @@
XCOMM $XConsortium: Imakefile /main/2 1996/04/21 19:14:11 drk $
TOOL_DIR = ../../dbTools
DATABASE_DIR = ../../../../databases
#ifdef HPArchitecture
PLATFORM = hp-ux
#endif
#ifdef RsArchitecture
PLATFORM = aix
#endif
#ifdef SunArchitecture
PLATFORM = sun
.NO_PARALLEL:
#endif
#ifdef AlphaArchitecture
PLATFORM = dec
#endif
all::
configMin:: $(DATABASE_DIR)/CDE-MIN.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-MIN.udb > CDE-MIN.lst
../build_udb_list CDE-MIN ../../../..
configTT:: $(DATABASE_DIR)/CDE-TT.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-TT.udb > CDE-TT.lst
../build_udb_list CDE-TT ../../../..
configRun:: $(DATABASE_DIR)/CDE-RUN.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-RUN.udb > CDE-RUN.lst
../build_udb_list CDE-RUN ../../../..
configShlibs:: $(DATABASE_DIR)/CDE-SHLIBS.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-SHLIBS.udb > CDE-SHLIBS.lst
../build_udb_list CDE-SHLIBS ../../../..
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)
AllTarget(configShlibs configTT configRun configMin)
CppScriptTarget(configShlibs,configShlibs.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(configTT,configTT.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(configRun,configRun.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(configMin,configMin.src,$(LOCAL_CPP_DEFINES),)
clean::
$(RM) *.lst *.list

View File

@@ -1,236 +0,0 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MIN
XCOMM configure
XCOMM @(#) $XConsortium: configMin.src /main/3 1996/04/23 20:38:09 drk $
XCOMM #######
#define HASH #
PRODUCT=CDE
FILESET=CDE-MIN
DO_CONFIGURATION=""
retval=0
FixEtcServices()
{
FILE=/etc/services
TMPFILE=/tmp/services
XCOMM
XCOMM check for existence of /etc/services
XCOMM
if [ ! -f $FILE ] # highly unlikely
then
echo "" >$FILE
fi
XCOMM
XCOMM see if it already exists
XCOMM
awk '{if ($1 == "dtspc")
print $0 > "/tmp/dtspc-already-there"
}' $FILE >/dev/null
if [ ! -f /tmp/dtspc-already-there ]
then
echo "dtspc\t\t6112/tcp\t#subprocess control" >>$FILE
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
awk '{if ($1 == "dtspcd" || $1 == "#dtspcd")
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
UnfixEtcServices()
{
FILE=/etc/services
TMPFILE=/tmp/services
awk '{if ($1 == "dtspc" && $2 == "6112/tcp")
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
FixEtcInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f $FILE ] # highly unlikely
then
echo "" >$FILE
fi
XCOMM
XCOMM Desired entry:
XCOMM dtspc stream tcp nowait root /usr/dt/bin/dtspcd dtspcd
XCOMM
XCOMM
XCOMM see if it already exists
XCOMM
awk '{if ($1 == "dtspc")
print $0 > "/tmp/dtspc-already-there"
}' $FILE >/dev/null
DTSPCD=CDE_INSTALLATION_TOP/bin/dtspcd
if [ ! -f /tmp/dtspc-already-there ]
then
echo "dtspc stream tcp nowait root $DTSPCD dtspcd" >>$FILE
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
awk '{if ($1 == "dtspcd" || $1 == "#dtspcd")
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
UnfixEtcInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
awk '{if ($1 == "dtspc")
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
RemoveMinFiles()
{
while read SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
dirname=${SRC%/STAR}
if [ -d $dirname ]
then
cd $dirname
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
fi
done <<-EOF
#include "CDE-MIN.list"
EOF
}
VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
do
#include "../verify.func"
done <<-EOF
#include "CDE-MIN.lst"
EOF
}
#include "../option.func"
XCOMM ###############################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ###############################################################
HandleOption $*
if [ "$OPERATION" = "configure" ]
then
FixEtcServices
FixEtcInetdDotConf
HASH
HASH create the /var/dt/tmp directory for the dtspcd
HASH
if [ ! -d CDE_LOGFILES_TOP/tmp ]
then
mkdir -p CDE_LOGFILES_TOP/tmp
fi
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixEtcServices
UnfixEtcInetdDotConf
RemoveMinFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
if [ "$OPERATION" != "verify" ]
then
HASH issue a SIGHUP to the inetd process
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -1,438 +0,0 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-RUN
XCOMM configure
XCOMM @(#) $XConsortium: configRun.src /main/4 1996/10/18 16:25:41 drk $
XCOMM #######
#define HASH #
#define STAR *
PRODUCT=CDE
FILESET=CDE-RUN
DO_CONFIGURATION=""
retval=0
FixInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
XCOMM
XCOMM desired inetd.conf entry:
XCOMM cmsd/2-5 dgram rpc/udb wait root /usr/dt/bin/rpc.cmsd rpc.cmsd
XCOMM
XCOMM first make an awk script and put it in a file.
XCOMM
XCOMM comment out any non-cde cmsd lines
XCOMM
nawk -v cmsd=$CMSD \
'{if ($1 == "cmsd/2-4" && $6 != cmsd)
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
XCOMM remove any cde 2-4 cmsd
XCOMM
nawk -v cmsd=$CMSD \
'{if ($1 == "cmsd/2-4" && $6 == cmsd)
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
XCOMM
XCOMM now run an awk script to see if there is an occurrence of 2-5 cmsd
XCOMM
nawk -v cmsd=$CMSD \
'{if ($6 == cmsd && $1 == "cmsd/2-5")
print $0 > "/tmp/cmsd-already-there"
}' $FILE >/dev/null
XCOMM
XCOMM if it is not there, add it
XCOMM
if [ ! -f /tmp/cmsd-already-there ]
then
echo "cmsd/2-5 dgram rpc/udp wait root $CMSD rpc.cmsd" >>$FILE
else
rm /tmp/cmsd-already-there
fi
}
UnfixInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
HASH first remove the CDE cmsd entry
nawk -v cmsd=$CMSD \
'{if (($1 == "cmsd/2-4" || $1 == "cmsd/2-5") && $6 == cmsd)
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
HASH now uncomment any previously existing 100068 entry
awk '{if ($1 == "#cde") {
if ($2 == "cmsd/2-4") {
$1 = $2;
$2 = ""
}
}
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
FixEtcRpc()
{
XCOMM
XCOMM now check to see if the proper entry is in /etc/rpc
XCOMM
RPCFILE=/etc/rpc
TMPFILE=/tmp/etc-rpc
if [ ! -f $RPCFILE ]
then
HASH if the file doesn't exist (highly unlikely), make one
HASH with the proper entry
HASH
echo "cmsd 100068 dtcalendar" >$RPCFILE
else
HASH
HASH check to see if the entry is already there
HASH
awk '{if ($1 == "cmsd" && $2 == "100068")
print $0 > "/tmp/etc-rpc-already-there"
}' $RPCFILE >/dev/null
if [ ! -f /tmp/etc-rpc-already-there ]
then
HASH
HASH if it isn't, check to see if either term already
HASH exists
HASH
awk '{if ($1 == "cmsd" || $2 == "100068")
print $0 > "/tmp/etc-rpc-already-there"
}' $RPCFILE >/dev/null
HASH
HASH if either one does they need to be commented out
HASH
if [ ! -f /tmp/etc-rpc-already-there ]
then
echo "cmsd 100068 dtcalendar" >>$RPCFILE
else
awk '{if ($1 == "cmsd" || $2 == "100068")
print "#cde " $0;
else
print $0
}' $RPCFILE >$TMPFILE
echo "cmsd 100068 dtcalendar" >>$TMPFILE
mv $TMPFILE $RPCFILE
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 == "cmsd" && $2 == "100068")
;
else
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
awk '{if ($1 == "#cde" && ($2 == "cmsd" || $3 == "100068"))
;
else
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
}
FixXlogin()
{
if [ -L /sbin/rc3.d/S95xdm ]
then
/bin/cp -f CDE_INSTALLATION_TOP/bin/xlogin /sbin/init.d/xlogin
/bin/chown bin:bin /sbin/init.d/xlogin
/bin/chmod 750 /sbin/init.d/xlogin
/bin/ln -f -s ../init.d/xlogin /sbin/rc3.d/S95xdm
fi
}
UnfixXlogin()
{
if [ -L /sbin/rc3.d/S95xdm ]
then
/bin/ln -f -s ../init.d/xdm /sbin/rc3.d/S95xdm
if [ -e /sbin/init.d/xlogin ]
then
/bin/rm -f /sbin/init.d/xlogin
fi
fi
}
CreateAppConfigDirectory()
{
HASH
HASH Create the APPCONFIG directory inside DT_CONFIG_TOP and create
HASH all of its subdirectories
HASH
cd $DT_CONFIG_TOP
if [ ! -d $APPCONFIG ]
then
mkdir $APPCONFIG
fi
cd $APPCONFIG
for i in $APPCONFIG_DIRS
do
if [ ! -d $i ]
then
mkdir $i
fi
cd $i
HASH
HASH for each locale
HASH
for j in $DT_TOP/$APPCONFIG/$i/STAR
do
if [ ! -d `basename $j` ]
then
mkdir `basename $j`
fi
done
cd ..
done
}
doDttermTerminfo()
{
if [ -f $DT_TOP/config/dtterm.ti ]
then
/bin/tic $DT_TOP/config/dtterm.ti
if [ -f /usr/share/lib/terminfo/d/dtterm ]
then
/bin/chown bin:bin /usr/share/lib/terminfo/d/dtterm
/bin/chmod 644 /usr/share/lib/terminfo/d/dtterm
else
echo "Unable to compile $DT_TOP/config/dtterm.ti"
fi
else
echo "Unable to find $DT_TOP/config/dtterm.ti"
fi
}
RemoveRunFiles()
{
while read SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
dirname=${SRC%/STAR}
if [ -d $dirname ]
then
cd $dirname
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
fi
done <<-EOF
#include "CDE-RUN.list"
EOF
}
VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
do
#include "../verify.func"
done <<-EOF
#include "CDE-RUN.lst"
EOF
}
#include "../option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-RUN
DT_TOP=CDE_INSTALLATION_TOP
DT_CONFIG_TOP=CDE_CONFIGURATION_TOP
DT_TEMP_TOP=CDE_LOGFILES_TOP
ROOT=/
retval=0
APPCONFIG=appconfig
APPCONFIG_DIRS="appmanager help icons types"
PRINTERS=""
DEFAULT_PRINTER="DtPrint"
HandleOption $*
if [ "$OPERATION" = "configure" ]
then
HASH
HASH create the CDE_LOGFILES_TOP directory
HASH
if [ ! -d $DT_TEMP_TOP/$APPCONFIG/appmanager ]
then
mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager
fi
cd $DT_TEMP_TOP
mv $APPCONFIG/appmanager .hidden-appmanager
chmod -R 755 *
chmod 755 .hidden-appmanager
chown -R bin *
chgrp -R bin *
mv .hidden-appmanager $APPCONFIG/appmanager
chmod 755 .
chown bin .
chgrp bin .
HASH
HASH create the CDE_CONFIGURATION_TOP and its config directory
HASH
if [ ! -d $DT_CONFIG_TOP ]
then
mkdir -p $DT_CONFIG_TOP
fi
if [ ! -d $DT_CONFIG_TOP/config ]
then
mkdir -p $DT_CONFIG_TOP/config
fi
CreateAppConfigDirectory
HASH
HASH ConfigurePrintersDir
HASH
env LANG=C LD_LIBRARY_PATH=$DT_TOP/lib:/usr/shlib:/usr/lib $DT_TOP/bin/dtprintinfo -populate
HASH
HASH Configure Xsession.d
HASH
cd $DT_CONFIG_TOP/config
if [ ! -d Xsession.d ]
then
mkdir Xsession.d
fi
cd $DT_CONFIG_TOP
chmod -R 755 *
FixInetdDotConf
FixEtcRpc
FixXlogin
doDttermTerminfo
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixXlogin
UnfixEtcRpc
UnfixInetdDotConf
rm -f /usr/share/lib/terminfo/d/dtterm
RemoveRunFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
if [ "$OPERATION" != "verify" ]
then
HASH issue a SIGHUP to the inetd process
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -1,166 +0,0 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-SHLIBS
XCOMM customize
XCOMM @(#) $XConsortium: configShlibs.src /main/2 1996/04/21 19:14:20 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveShlibFiles()
{
while read SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
dirname=${SRC%/STAR}
if [ -d $dirname ]
then
cd $dirname
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
fi
done <<-EOF
#include "CDE-SHLIBS.list"
EOF
}
VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
do
#include "../verify.func"
done <<-EOF
#include "CDE-SHLIBS.lst"
EOF
}
#include "../option.func"
MakeTheLink()
{
XCOMM
XCOMM Special treatment for CDE .so's that would otherwise overwrite
XCOMM sponsor-provided libraries.
XCOMM
typeset -i status=0
for lib in $CDE_NEW_SHLIB
do
savedlib=/usr/shlib/$lib.preCDE
sharelib=/usr/shlib/$lib
cdelib=CDE_INSTALLATION_TOP/lib/$lib
echo " Creating symlink for $lib"
if [ -L $sharelib ]
then
if [ ! -e $savedlib ]
then
/bin/mv $sharelib $savedlib
fi
/bin/ln -s -f $cdelib $sharelib
elif [ -e $sharelib ]
then
/bin/mv -f $sharelib $savedlib
/bin/ln -s $cdelib $sharelib
else
echo " Failed to symlink $lib"
status=1
fi
done
return $status
}
UnmakeTheLink()
{
XCOMM
XCOMM Restore the saved versions of libraries.
XCOMM
for lib in $CDE_NEW_SHLIB
do
savedlib=/usr/shlib/$lib.preCDE
newlib=/usr/shlib/$lib
echo " Restoring $lib"
if [ -e $savedlib ]
then
if [ -L $newlib ]
then
/bin/rm -f $newlib
/bin/mv -f $savedlib $newlib
elif [ -e /usr/shlib/$lib ]
then
echo " $newlib is not a symlink. Left alone."
else
/bin/mv -f $savedlib $newlib
fi
fi
done
return $status
}
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-SHLIBS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
CDE_NEW_SHLIB="libXm.so libMrm.so"
HandleOption $*
if [ "$OPERATION" = "configure" ]
then
XCOMM MakeTheLink
retval=0
elif [ "$OPERATION" = "deconfigure" ]
then
XCOMM UnmakeTheLink
RemoveShlibFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -1,239 +0,0 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-TT
XCOMM configure
XCOMM @(#) $XConsortium: configTT.src /main/3 1996/04/23 20:38:20 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define HASH #
PRODUCT=CDE
FILESET=CDE-TT
DO_CONFIGURATION=""
retval=0
FixInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
OLDTTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserverd
XCOMM
XCOMM Desired entry:
XCOMM ttdbserver stream rpc/tcp wait root /usr/dt/bin/rpc.ttdbserver rpc.ttdbserver
XCOMM
XCOMM
XCOMM see if it already exists
XCOMM
nawk -v ttdb=$TTDBSERVERD -v oldttdb=$OLDTTDBSERVERD \
'{if (($1 == "ttdbserver" && $6 != ttdb) ||
($1 == "ttdbserverd" && $6 == oldttdb))
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "ttdbserver")
print $0 > "/tmp/tt-already-there"
}' $FILE >/dev/null
if [ ! -f /tmp/tt-already-there ]
then
echo "ttdbserver stream rpc/tcp wait root $TTDBSERVERD rpc.ttdbserver" >>$FILE
else
rm /tmp/tt-already-there
fi
}
UnfixInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
OLDTTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserverd
nawk -v ttdb=$TTDBSERVERD \
'{if ($1 == "ttdbserver" && $6 == ttdb)
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "#cde" &&
($2 == "ttdbserver" || $2 == "ttdbserverd")) {
$1 = $2;
$2 = ""
}
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
FixEtcRpc()
{
FILE=/etc/rpc
TMPFILE=/tmp/etc-rpc
if [ ! -f $FILE ]
then
echo "ttdbserver 100083 tooltalk" >$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 tooltalk" >>$FILE
else
awk '{if ($1 == "ttdbserver" || $2 == "100083")
print "#cde " $0; else print $0
}' $FILE >$TMPFILE
echo "ttdbserver 100083 tooltalk" >>$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
}
RemoveTTFiles()
{
while read SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
dirname=${SRC%/STAR}
if [ -d $dirname ]
then
cd $dirname
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
fi
done <<-EOF
#include "CDE-TT.list"
EOF
}
VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
do
#include "../verify.func"
done <<-EOF
#include "CDE-TT.lst"
EOF
}
#include "../option.func"
XCOMM ######################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ######################################################################
HandleOption $*
if [ "$OPERATION" = "configure" ]
then
FixInetdDotConf
FixEtcRpc
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixEtcRpc
UnfixInetdDotConf
RemoveTTFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
if [ "$OPERATION" != "verify" ]
then
HASH issue a SIGHUP to the inetd process
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh
else
/usr/sbin/inetd -s
fi
rm /tmp/tmppsout
fi
return $retval

View File

@@ -523,7 +523,6 @@ RemoveRunFiles()
/usr/dt/lib/bindings/xmbind.alias
/usr/dt/lib/bindings/acorn
/usr/dt/lib/bindings/apollo
/usr/dt/lib/bindings/dec
/usr/dt/lib/bindings/dg_AViiON
/usr/dt/lib/bindings/doubleclick
/usr/dt/lib/bindings/hitachi
@@ -814,7 +813,6 @@ VerifyInstalledFiles()
/usr/dt/lib/bindings/xmbind.alias 0444 lib/Xm/bindings/xmbind.alias file bin bin di---- 378 cde_dt
/usr/dt/lib/bindings/acorn 0444 lib/Xm/bindings/acorn file bin bin di---- 378 cde_dt
/usr/dt/lib/bindings/apollo 0444 lib/Xm/bindings/apollo file bin bin di---- 378 cde_dt
/usr/dt/lib/bindings/dec 0444 lib/Xm/bindings/dec file bin bin di---- 378 cde_dt
/usr/dt/lib/bindings/dg_AViiON 0444 lib/Xm/bindings/dg_AViiON file bin bin di---- 378 cde_dt
/usr/dt/lib/bindings/doubleclick 0444 lib/Xm/bindings/doubleclick file bin bin di---- 378 cde_dt
/usr/dt/lib/bindings/hitachi 0444 lib/Xm/bindings/hitachi file bin bin di---- 378 cde_dt