Create a toplevel delete-later dir and put databases/ and admin/ into it

This commit is contained in:
Jon Trulson
2021-07-03 19:30:22 -06:00
parent 7961d9e2da
commit 39d3a67701
103 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
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 RsArchitecture
PLATFORM = aix
#endif
#ifdef SunArchitecture
PLATFORM = sun
.NO_PARALLEL:
#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

@@ -0,0 +1,150 @@
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 #
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 -e "dtspc\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
}
RemoveMinFiles()
{
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d "$dirname" ]
then
cd "$dirname" || exit
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 -r 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
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
RemoveMinFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,230 @@
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 *
retval=0
CreateAppConfigDirectory()
{
HASH
HASH Create the APPCONFIG directory inside DT_CONFIG_TOP and create
HASH all of its subdirectories
HASH
cd "$DT_CONFIG_TOP" || exit
if [ ! -d "$APPCONFIG" ]
then
mkdir "$APPCONFIG"
fi
cd "$APPCONFIG" || exit
for i in $APPCONFIG_DIRS
do
(
if [ ! -d "$i" ]
then
mkdir "$i"
fi
cd "$i" || exit
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
)
done
}
doDttermTerminfo()
{
if [ -f "$DT_TOP/config/dtterm.ti" ]
then
tic "$DT_TOP/config/dtterm.ti"
if [ -f /usr/share/lib/terminfo/d/dtterm ]
then
chown bin /usr/share/lib/terminfo/d/dtterm
chgrp bin /usr/share/lib/terminfo/d/dtterm
chmod 644 /usr/share/lib/terminfo/d/dtterm
else
if [ -f /usr/share/terminfo/d/dtterm ]
then
chown bin /usr/share/terminfo/d/dtterm
chgrp bin /usr/share/terminfo/d/dtterm
chmod 644 /usr/share/terminfo/d/dtterm
fi
fi
if [ ! -f /usr/share/lib/terminfo/d/dtterm ] && [ ! -f /usr/share/terminfo/d/dtterm ]
then
echo "Unable to compile $DT_TOP/config/dtterm.ti"
fi
else
echo "Unable to find $DT_TOP/config/dtterm.ti"
fi
}
RemoveRunFiles()
{
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d "$dirname" ]
then
cd "$dirname" || exit
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 ##########################################################################
DT_TOP=CDE_INSTALLATION_TOP
DT_CONFIG_TOP=CDE_CONFIGURATION_TOP
DT_TEMP_TOP=CDE_LOGFILES_TOP
retval=0
APPCONFIG=appconfig
APPCONFIG_DIRS="appmanager help icons types"
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" || exit
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 || exit
if [ ! -d Xsession.d ]
then
mkdir Xsession.d
fi
cd $DT_CONFIG_TOP || exit
chmod -R 755 -- *
doDttermTerminfo
elif [ "$OPERATION" = "deconfigure" ]
then
RemoveRunFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,102 @@
XCOMM!/bin/ksh
XCOMM $TOG: configShlibs.src /main/1 1998/03/11 16:18:33 mgreess $
#define STAR *
XCOMM ############################################
RemoveShlibFiles()
{
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d "$dirname" ]
then
cd "$dirname" || exit
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 -r 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 || exit
for lib in $(/bin/ls lib*.so.*)
do
link=$(echo "$lib" | cut -d. -f1,2)
rm -f "$link"
ln -s "$lib" "$link"
done
}
XCOMM #########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM #########################################################################
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-SHLIBS..."
RemoveShlibFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "configure" ]
then
MakeTheLink
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,85 @@
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 #
retval=0
RemoveTTFiles()
{
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d "$dirname" ]
then
cd "$dirname" || exit
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 -r 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
return 0
elif [ "$OPERATION" = "deconfigure" ]
then
RemoveTTFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval