1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtinfo other files

This commit is contained in:
Ulrich Wilkens 2013-08-28 21:16:39 +02:00 committed by Jon Trulson
parent acdae62484
commit 4ec9658299
42 changed files with 1415 additions and 118 deletions

View file

@ -207,10 +207,7 @@ CleanDaemons()
then
stopsrc -s inetd >>$LOGFILE 2>&1
fi
elif [ "$PLATFORM" = openbsd ]
then
true
elif [ "$PLATFORM" = freebsd ]
elif [ "$PLATFORM" = "openbsd" ]
then
ps axo pid,comm | grep $i > /tmp/tmppsout
if [ -s /tmp/tmppsout ]
@ -218,6 +215,22 @@ CleanDaemons()
awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
sleep 2
fi
elif [ "$PLATFORM" = "freebsd" ]
then
ps axo pid,comm | grep $i > /tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
sleep 2
fi
elif [ "$PLATFORM" = "linux" ]
then
ps axo pid,comm | grep $i > /tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill " $1}' /tmp/tmppsout | /bin/sh -f
sleep 2
fi
else
ps -ef | grep $i | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
@ -247,10 +260,13 @@ RestartInetd()
/usr/sbin/inetd
elif [ "$PLATFORM" = "openbsd" ]
then
true
/etc/rc.d/inetd start >/dev/null
elif [ "$PLATFORM" = "freebsd" ]
then
/etc/rc.d/inetd onestart
elif [ "$PLATFORM" = "linux" ]
then
/etc/init.d/openbsd-inetd start >/dev/null 2>&1
else
#ifdef hpV4
/usr/sbin/inetd
@ -553,7 +569,7 @@ XCOMM
elif [ $BUILDSYSTEM = "Linux" ];
then
PLATFORM="linux"
PLATFORM_SCRIPT_DIR=""
PLATFORM_SCRIPT_DIR="linux"
elif [ $BUILDSYSTEM = "FreeBSD" ];
then
PLATFORM="freebsd"
@ -561,7 +577,7 @@ XCOMM
elif [ $BUILDSYSTEM = "OpenBSD" ];
then
PLATFORM="openbsd"
PLATFORM_SCRIPT_DIR=""
PLATFORM_SCRIPT_DIR="openbsd"
else # Build system = HP
PLATFORM=hp-ux
PLATFORM_SCRIPT_DIR=hp

View file

@ -517,12 +517,12 @@ doit()
# set permissions for non-links
if [ "${TYPE%link}" = "$TYPE" ]; then
if [ "$USER" = "root" ]; then
chmod $MODE $DEST ||
echo "ERROR: \"chmod $MODE $DEST\" failed" >&2
chgrp $GROUP $DEST ||
echo "ERROR: \"chgrp $GROUP $DEST\" failed" >&2
chown $OWNER $DEST ||
echo "ERROR: \"chown $OWNER $DEST\" failed" >&2
chmod $MODE $DEST ||
echo "ERROR: \"chmod $MODE $DEST\" failed" >&2
fi
fi

View file

@ -22,6 +22,7 @@ SUBDIRS = linux
#endif
#ifdef OpenBSDArchitecture
PLATFORM = openbsd
SUBDIRS = openbsd
#endif
#ifdef FreeBSDArchitecture
PLATFORM = freebsd

View file

@ -322,9 +322,6 @@ DEFAULT_PRINTER="DtPrint"
/etc/rc.d/inetd onereload
fi
HASH dtmail requires setgid
chmod 2555 $DT_TOP/bin/dtmail
HASH dtmail requires setgid
chmod 2555 $DT_TOP/bin/dtmail

View file

@ -227,7 +227,7 @@ XCOMM ###############################################################
FixEtcInetdDotConf
FixEtcPamDotConf
HASH FixEtcPamDotConf
HASH
HASH create the /var/dt/tmp directory for the dtspcd
@ -266,9 +266,9 @@ XCOMM ###############################################################
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh
else
/usr/sbin/inetd -s
[ -x /usr/sbin/inetd ] && /usr/sbin/inetd
fi
fi

View file

@ -20,6 +20,15 @@ FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f $FILE ] # highly unlikely
then
echo "" >$FILE
fi
XCOMM
XCOMM desired inetd.conf entry:
XCOMM 100068/2-4 dgram rpc/udp wait root CDE_INSTALLATION_TOP/bin/rpc.cmsd rpc.cmsd
@ -31,7 +40,7 @@ XCOMM
XCOMM comment out any non-cde rpc.cmsd lines
XCOMM
nawk -v cmsd=$CMSD \
awk -v cmsd=$CMSD \
'{if ($1 == "100068/2-4" && $6 != cmsd)
print "#cde " $0;
else
@ -44,7 +53,7 @@ XCOMM
XCOMM remove any cde 2-4 cmsd
XCOMM
nawk -v cmsd=$CMSD \
awk -v cmsd=$CMSD \
'{if ($1 == "100068/2-4" && $6 == cmsd)
;
else
@ -58,7 +67,7 @@ XCOMM
XCOMM now run an awk script to see if there is an occurrence of 2-5 cmsd
XCOMM
nawk -v cmsd=$CMSD \
awk -v cmsd=$CMSD \
'{if ($6 == cmsd && $1 == "100068/2-5")
print $0 > "/tmp/cmsd-already-there"
}' $FILE >/dev/null
@ -84,7 +93,7 @@ CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
HASH first remove the CDE rpc.cmsd entry
nawk -v cmsd=$CMSD \
awk -v cmsd=$CMSD \
'{if (($1 == "100068/2-4" || $1 == "100068/2-5") && $6 == cmsd)
;
else
@ -298,7 +307,7 @@ DEFAULT_PRINTER="DtPrint"
HASH
HASH ConfigurePrintersDir
HASH
env LANG=C /usr/dt/bin/dtprintinfo -populate
HASH env LANG=C /usr/dt/bin/dtprintinfo -populate
HASH
HASH Configure Xsession.d
@ -341,7 +350,7 @@ DEFAULT_PRINTER="DtPrint"
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh
else
[ -x /usr/sbin/inetd ] && /usr/sbin/inetd
fi

View file

@ -20,13 +20,22 @@ FixInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserverd
TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f $FILE ] # highly unlikely
then
echo "" >$FILE
fi
XCOMM
XCOMM see if it already exists
XCOMM
nawk -v ttdb=$TTDBSERVERD \
awk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 != ttdb)
print "#cde " $0;
else
@ -53,9 +62,9 @@ UnfixInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserverd
TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
nawk -v ttdb=$TTDBSERVERD \
awk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 == ttdb)
;
else
@ -155,9 +164,9 @@ XCOMM ######################################################################
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh
else
/usr/sbin/inetd -s
[ -x /usr/sbin/inetd ] && /usr/sbin/inetd
fi
rm /tmp/tmppsout

View file

@ -0,0 +1,68 @@
XCOMM $TOG: Imakefile /main/1 1998/03/11 16:08:16 mgreess $
TOOL_DIR = ../../dbTools
DATABASE_DIR = ../../../../databases
#ifdef HPArchitecture
PLATFORM = hp-ux
#endif
#ifdef LinuxArchitecture
PLATFORM = linux
#endif
#ifdef FreeBSDArchitecture
PLATFORM = freebsd
#endif
#ifdef OpenBSDArchitecture
PLATFORM = openbsd
#endif
#ifdef RsArchitecture
PLATFORM = aix
#endif
#ifdef SunArchitecture
PLATFORM = sun
.NO_PARALLEL:
#endif
#ifdef USLArchitecture
PLATFORM = usl
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
#endif
UDBTOANY = $(KORNSHELL) $(TOOL_DIR)/udbToAny.ksh
BUILD_UDB_LIST = $(SHELL) ../build_udb_list
all::
configMin:: $(DATABASE_DIR)/CDE-MIN.udb
$(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-MIN.udb > CDE-MIN.lst
$(BUILD_UDB_LIST) CDE-MIN ../../../..
configTT:: $(DATABASE_DIR)/CDE-TT.udb
$(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-TT.udb > CDE-TT.lst
$(BUILD_UDB_LIST) CDE-TT ../../../..
configRun:: $(DATABASE_DIR)/CDE-RUN.udb
$(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-RUN.udb > CDE-RUN.lst
$(BUILD_UDB_LIST) CDE-RUN ../../../..
configShlibs:: $(DATABASE_DIR)/CDE-SHLIBS.udb
$(UDBTOANY) -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

@ -0,0 +1,257 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MIN
XCOMM configure
XCOMM @(#) $TOG: configMin.src /main/1 1998/03/11 16:18:12 mgreess $
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
printf "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 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 tcp4 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
}
FixEtcPamDotConf()
{
FILE=/etc/pam.conf
ORIGFILE=/etc/pam.conf.preCDE
XCOMM
XCOMM check for existence of /etc/pam.conf
XCOMM
if [ -f $FILE ]
then
echo "" > $ORIGFILE
cp CDE_INSTALLATION_TOP/config/sys.pam.conf $FILE
chmod 644 $FILE
else
echo "Warning: $FILE already exists. Leaving it alone." 1>&2
cp CDE_INSTALLATION_TOP/config/sys.pam.conf $ORIGFILE
fi
}
UnfixEtcPamDotConf()
{
FILE=/etc/pam.conf
TMPFILE=/etc/pam.conf.CDE
ORIGFILE=/etc/pam.conf.preCDE
if [ ! -f $FILE ]
then
echo "Warning: $FILE does not exist." 1>&2
elif [ ! -f $ORIGFILE ]
then
echo "Warning: $ORIGFILE does not exist. Leaving $FILE alone." 1>&2
else
mv $FILE $TMPFILE
cp $ORIGFILE $FILE
chmod 664 $FILE
fi
}
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
return $retval

View file

@ -0,0 +1,328 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-RUN
XCOMM configure
XCOMM @(#) $TOG: configRun.src /main/1 1998/03/11 16:18:24 mgreess $
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-4 dgram rpc/udp4 wait root CDE_INSTALLATION_TOP/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 rpc.cmsd lines
XCOMM
awk -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
awk -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
awk -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/udp4 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 rpc.cmsd entry
awk -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 cmsd entry
awk '{if ($1 == "#cde") {
if ($2 == "cmsd/2-4") {
$1 = $2;
$2 = ""
}
}
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
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
tic $DT_TOP/config/dtterm.ti
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
}
PrintUsage()
{
echo "Usage:" $0 "[OPERATION]"
echo ""
echo "Operations:"
echo " -e configure"
echo " -d deconfigure"
echo " -v verify"
echo " -s size"
echo " -h help"
}
#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" = "usage" ]
then
PrintUsage
exit 0
fi
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
HASH env LANG=C /usr/dt/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
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixInetdDotConf
RemoveRunFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
if [ "$OPERATION" != "verify" ]
then
HASH issue a SIGHUP to the inetd process
/etc/rc.d/inetd reload >/dev/null
fi
HASH dtmail requires setgid
chmod 2555 $DT_TOP/bin/dtmail
return $retval

View file

@ -0,0 +1,109 @@
XCOMM!/bin/ksh
XCOMM $TOG: configShlibs.src /main/1 1998/03/11 16:18:33 mgreess $
#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 Usage: configTT
XCOMM
XCOMM creates links in the install tree libtt.so -> libtt.so.1
XCOMM
cd CDE_INSTALLATION_TOP/lib
for lib in `/bin/ls *.so.*`
do
link=`echo $lib | cut -d. -f1,2`
rm -f $link
ln -s $lib $link
done
}
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
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-SHLIBS..."
RemoveShlibFiles
/sbin/ldconfig -R
VerifyInstalledFiles
elif [ "$OPERATION" = "configure" ]
then
MakeTheLink
/sbin/ldconfig -m "${CDE_TOP}/lib"
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View file

@ -0,0 +1,150 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-TT
XCOMM configure
XCOMM @(#) $TOG: configTT.src /main/1 1998/03/11 16:18:40 mgreess $
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
XCOMM
XCOMM see if it already exists
XCOMM
awk -v ttdb=$TTDBSERVERD \
'{if ($1 == "ttdbserver/1" && $6 != ttdb)
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "ttdbserver/1")
print $0 > "/tmp/tt-already-there"
}' $FILE >/dev/null
if [ ! -f /tmp/tt-already-there ]
then
echo "ttdbserver/1 stream rpc/tcp4 wait root $TTDBSERVERD $TTDBSERVERD" \
>>$FILE
else
rm /tmp/tt-already-there
fi
}
UnfixInetdDotConf()
{
FILE=/etc/inetd.conf
TMPFILE=/tmp/inetd.conf
TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
awk -v ttdb=$TTDBSERVERD \
'{if ($1 == "ttdbserver/1" && $6 == ttdb)
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "#cde" && ($2 == "ttdbserver/1" || $2 == "ttdbserver")) {
$1 = $2;
$2 = ""
}
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
}
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
elif [ "$OPERATION" = "deconfigure" ]
then
: UnfixInetdDotConf
RemoveTTFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval