Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,164 @@
XCOMM $TOG: Imakefile /main/13 1998/03/11 16:20:10 mgreess $
#ifndef HPArchitecture
# define IHaveSubdirs
#endif
#define PassCDebugFlags
#ifdef SunArchitecture
.NO_PARALLEL:
#endif
TOOL_DIR = ../dbTools
DATABASE_DIR = ../../../databases
BUILD_UDB_TOOL = ./build_udb_list
#ifdef HPArchitecture
PLATFORM = hp-ux
#endif
#ifdef LinuxArchitecture
PLATFORM = linux
SUBDIRS = linux
#endif
#ifdef RsArchitecture
PLATFORM = aix
SUBDIRS = ibm
#endif
#ifdef SunArchitecture
PLATFORM = sun
SUBDIRS = sun
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
SUBDIRS = uxp
#endif
#ifdef USLArchitecture
PLATFORM = usl
SUBDIRS = usl
#endif
#ifdef AlphaArchitecture
PLATFORM = dec
SUBDIRS = dec
#endif
#ifndef HPArchitecture
MakeSubdirs($(SUBDIRS))
#endif
all::
configHelp:: $(DATABASE_DIR)/CDE-HELP-C.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-HELP-C.udb > CDE-HELP-C.lst
$(BUILD_UDB_TOOL) CDE-HELP-C ../../..
configHelpPrg:: $(DATABASE_DIR)/CDE-HELP-PRG.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-HELP-PRG.udb > CDE-HELP-PRG.lst
$(BUILD_UDB_TOOL) CDE-HELP-PRG ../../..
configDemos:: $(DATABASE_DIR)/CDE-DEMOS.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-DEMOS.udb > CDE-DEMOS.lst
$(BUILD_UDB_TOOL) CDE-DEMOS ../../..
configFonts:: $(DATABASE_DIR)/CDE-FONTS.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-FONTS.udb > CDE-FONTS.lst
$(BUILD_UDB_TOOL) CDE-FONTS ../../..
configHelpRun:: $(DATABASE_DIR)/CDE-HELP-RUN.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-HELP-RUN.udb > CDE-HELP-RUN.lst
$(BUILD_UDB_TOOL) CDE-HELP-RUN ../../..
configIcons:: $(DATABASE_DIR)/CDE-ICONS.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-ICONS.udb > CDE-ICONS.lst
$(BUILD_UDB_TOOL) CDE-ICONS ../../..
configInc:: $(DATABASE_DIR)/CDE-INC.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-INC.udb > CDE-INC.lst
$(BUILD_UDB_TOOL) CDE-INC ../../..
configManDev:: $(DATABASE_DIR)/CDE-MAN-DEV.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-MAN-DEV.udb > CDE-MAN-DEV.lst
$(BUILD_UDB_TOOL) CDE-MAN-DEV ../../..
configMan:: $(DATABASE_DIR)/CDE-MAN.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-MAN.udb > CDE-MAN.lst
$(BUILD_UDB_TOOL) CDE-MAN ../../..
configMsgCat:: $(DATABASE_DIR)/CDE-MSG-C.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-MSG-C.udb > CDE-MSG-C.lst
$(BUILD_UDB_TOOL) CDE-MSG-C ../../..
configPrg:: $(DATABASE_DIR)/CDE-PRG.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-PRG.udb > CDE-PRG.lst
$(BUILD_UDB_TOOL) CDE-PRG ../../..
configShlibs:: $(DATABASE_DIR)/CDE-SHLIBS.udb
$(TOOL_DIR)/udbToAny.ksh -toLst -ReleaseStream $(PLATFORM) \
$(DATABASE_DIR)/CDE-SHLIBS.udb > CDE-SHLIBS.lst
$(BUILD_UDB_TOOL) CDE-SHLIBS ../../..
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)
CppSourceFile(configHelp,configHelp.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configHelpPrg,configHelpPrg.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configDemos,configDemos.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configFonts,configFonts.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configHelpRun,configHelpRun.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configIcons,configIcons.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configInc,configInc.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configMan,configMan.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configManDev,configManDev.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configMsgCat,configMsgCat.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configPrg,configPrg.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(configShlibs,configShlibs.src,$(LOCAL_CPP_DEFINES),)
configHelp:: configHelp.src
chmod +x configHelp
configHelpPrg:: configHelpPrg.src
chmod +x configHelpPrg
configDemos:: configDemos.src
chmod +x configDemos
configFonts:: configFonts.src
chmod +x configFonts
configHelpRun:: configHelpRun.src
chmod +x configHelpRun
configIcons:: configIcons.src
chmod +x configIcons
configInc:: configInc.src
chmod +x configInc
configMan:: configMan.src
chmod +x configMan
configManDev:: configManDev.src
chmod +x configManDev
configMsgCat:: configMsgCat.src
chmod +x configMsgCat
configPrg:: configPrg.src
chmod +x configPrg
configShlibs:: configShlibs.src
chmod +x configShlibs
clean::
$(RM) *.lst *.list

View File

@@ -0,0 +1,4 @@
#!/bin/ksh
awk '{if ($1 == "install_target" && $3 != "") print $3}' \
$2/databases/$1.udb >$1.list

View File

@@ -0,0 +1,93 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-DEMOS
XCOMM customize
XCOMM @(#) $XConsortium: configDemos.src /main/4 1996/04/23 19:32:44 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
XCOMM #
XCOMM # HELP_symlinks
XCOMM #
XCOMM # create various symlinks
XCOMM #
XCOMM ############################################
RemoveDemoFiles()
{
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-DEMOS.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-DEMOS.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-DEMOS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-DEMOS..."
RemoveDemoFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,90 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-FONTS
XCOMM customize
XCOMM @(#) $XConsortium: configFonts.src /main/4 1996/04/23 19:32:48 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveFontFiles()
{
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-FONTS.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-FONTS.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-FONTS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-FONTS..."
RemoveFontFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,90 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-HELP-C
XCOMM customize
XCOMM @(#) $XConsortium: configHelp.src /main/5 1996/04/23 19:32:52 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
RemoveHelpFiles()
{
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-HELP-C.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-HELP-C.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP-C
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
XCOMM
XCOMM set up symlinks that point into the $CDE_TOP tree
XCOMM
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-HELP-C..."
RemoveHelpFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,87 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-HELP
XCOMM customize
XCOMM @(#) $XConsortium: configHelpPrg.src /main/4 1996/04/23 19:32:56 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
RemoveHelpFiles()
{
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-HELP-PRG.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 <<-EOF1
#include "CDE-HELP-PRG.lst"
EOF1
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-HELP-PRG..."
RemoveHelpFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,89 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-HELP-RUN
XCOMM customize
XCOMM @(#) $XConsortium: configHelpRun.src /main/4 1996/04/23 19:33:00 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveHelpRunFiles()
{
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-HELP-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-HELP-RUN.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP-RUN
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-HELP-RUN..."
RemoveHelpRunFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,89 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-ICONS
XCOMM customize
XCOMM @(#) $XConsortium: configIcons.src /main/4 1996/04/23 19:33:04 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveIconFiles()
{
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-ICONS.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-ICONS.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-ICONS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-ICONS..."
RemoveIconFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,89 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-INC
XCOMM customize
XCOMM @(#) $XConsortium: configInc.src /main/4 1996/04/23 19:33:08 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveIncludeFiles()
{
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-INC.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-INC.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-INC
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-INC..."
RemoveIncludeFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,99 @@
XCOMM!/bin/ksh
XCOMM $XConsortium: configLang.src /main/3 1996/04/23 19:33:13 drk $
ConfigureBackdropsForLang()
{
if [ ! -d /etc/dt/backdrops/$thelang ]
then
mkdir -p /etc/dt/backdrops/$thelang
fi
typeset -L1 firstchar
exec 3< ${build_tree}/cde1/localized/${thelang}/backdrops/backdrops.msg
while read -u3 SRC
do
firstchar=$SRC
if [ "$SRC" != "" -a "$firstchar" != "!" ]
then
set -A tokens $SRC
if [ "${tokens[1]}" = "" ]
then
ln -s /usr/dt/backdrops/C/${tokens[0]} \
/etc/dt/backdrops/$thelang/${tokens[0]}
else
ln -s /usr/dt/backdrops/C/${tokens[0]} \
/etc/dt/backdrops/$thelang/${tokens[1]}
fi
fi
done
exec 3<&-
}
ConfigurePalettesForLang()
{
if [ ! -d /etc/dt/palettes/$thelang ]
then
mkdir -p /etc/dt/palettes/$thelang
fi
typeset -L1 firstchar
exec 3< ${build_tree}/cde1/localized/${thelang}/palettes/palettes.msg
while read -u3 SRC
do
firstchar=$SRC
if [ "$SRC" != "" -a "$firstchar" != "!" ]
then
set -A tokens $SRC
if [ "${tokens[1]}" = "" ]
then
ln -s /usr/dt/palettes/C/${tokens[0]} \
/etc/dt/palettes/$thelang/${tokens[0]}
else
ln -s /usr/dt/palettes/C/${tokens[0]} \
/etc/dt/palettes/$thelang/${tokens[1]}
fi
fi
done
exec 3<&-
}
#include "option.func"
XCOMM ##################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##################################################################
build_tree=$PWD
build_tree=${build_tree%/admin/IntegTools/post_install}
thelang=$2
if [ "$thelang" = "" -o "$thelang" = "-e" -o "$thelang" = "-d" ]
then
echo "Usage: configLang [ -e | -d ] <Lang>"
return 1
fi
HandleOption $*
if [ "$OPERATION" = "configure" ]
then
ConfigureBackdropsForLang
ConfigurePalettesForLang
elif [ "$OPERATION" = "deconfigure" ]
then
rm -rf /etc/dt/backdrops/$thelang
rm -rf /etc/dt/palettes/$thelang
fi

View File

@@ -0,0 +1,89 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MAN
XCOMM customize
XCOMM @(#) $XConsortium: configMan.src /main/4 1996/04/23 19:33:17 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveManFiles()
{
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-MAN.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-MAN.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-DEMOS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-MAN..."
RemoveManFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,100 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MAN-DEV
XCOMM customize
XCOMM @(#) $XConsortium: configManDev.src /main/4 1996/04/23 19:33:22 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveManDevFiles()
{
while read SRC
do
if [ "$SRC" != "" ]
then
if [ -L $SRC -a -d $SRC ]
then
results=`ls $SRC`
if [ ! -s "$SRC" ]
then
rm -f $SRC
else
continue
fi
else
rm -f $SRC
fi
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-MAN-DEV.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-MAN-DEV.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-MAN-DEV
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-MAN-DEV..."
RemoveManDevFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,87 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MIN
XCOMM configure
XCOMM @(#) $XConsortium: configMin.src /main/4 1996/04/23 19:33:27 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
PRODUCT=CDE
FILESET=CDE-MIN
retval=0
XCOMM
XCOMM check for existence of /etc/services
XCOMM
if [ ! -f /etc/services ] # highly unlikely
then
echo "" >/etc/services
fi
XCOMM
XCOMM see if it already exists
XCOMM
awk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
/etc/services >/dev/null
if [ ! -f /tmp/dtspc-already-there ]
then
echo "dtspc\t6112/tcp\t#subprocess control" >>/etc/services
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
/etc/services >/tmp/etc-services
mv /tmp/etc-services /etc/services
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f /etc/inetd.conf ] # highly unlikely
then
echo "" >/etc/inetd.conf
fi
XCOMM
XCOMM see if it already exists
XCOMM
awk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
/etc/inetd.conf >/dev/null
if [ ! -f /tmp/dtspc-already-there ]
then
echo dtspc stream tcp nowait root CDE_INSTALLATION_TOP/bin/dtspcd CDE_INSTALLATION_TOP/bin/dtspcd >>/etc/inetd.conf
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
/etc/inetd.conf >/tmp/etc-inetd-conf
mv /tmp/etc-inetd-conf /etc/inetd.conf
XCOMM
XCOMM create the /var/dt/tmp directory for the dtspcd
XCOMM
if [ ! -d CDE_LOGFILES_TOP/tmp ]
then
mkdir -p CDE_LOGFILES_TOP/tmp
fi
return $retval

View File

@@ -0,0 +1,89 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MSG-C
XCOMM customize
XCOMM @(#) $XConsortium: configMsgCat.src /main/5 1996/04/23 19:33:31 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveMsgCatFiles()
{
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-MSG-C.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-MSG-C.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-MSG-C
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-MSG-C..."
RemoveMsgCatFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,89 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-PRG
XCOMM customize
XCOMM @(#) $XConsortium: configPrg.src /main/4 1996/04/23 19:33:35 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemovePrgFiles()
{
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-PRG.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-PRG.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-PRG
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-PRG..."
RemovePrgFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "deconfigure" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,193 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-RUN
XCOMM customize
XCOMM @(#) $XConsortium: configRun.src /main/6 1996/10/18 16:30:22 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define HASH #
#define STAR *
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
XCOMM
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
}
LinkOtherIcons()
{
while read SRC
do
rm -f $DT_TOP/$APPCONFIG/icons/C/F$SRC
ln -s $DT_TOP/$APPCONFIG/icons/C/$SRC $DT_TOP/$APPCONFIG/icons/C/F$SRC
done <<-EOF
fphelp.t.pm
help.t.pm
paint.l.pm
paint.m.pm
paint.t.pm
penpad.t.pm
term.t.pm
EOF
}
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="Default_Print"
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
mv $APPCONFIG/appmanager .hidden-appmanager
chmod -R 755 $DT_TEMP_TOP/STAR
chmod 755 $DT_TEMP_TMP/.hidden-appmanager
chown -R bin $DT_TEMP_TOP/STAR
chgrp -R bin $DT_TEMP_TOP/STAR
mv $DT_TEMP_TMP/.hidden-appmanager $DT_TEMP_TMP/$APPCONFIG/appmanager
chmod 755 $DT_TEMP_TOP
chown bin $DT_TEMP_TOP
chgrp bin $DT_TEMP_TOP
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
cd $DT_TOP/$APPCONFIG/appmanager
HASH
HASH for each locale
HASH
for i in *
do
if [ -d $i ]
then
cd $i
HASH
HASH for each directory in the locale, check for a
HASH localized version of the Printers directory
HASH and for the file lp_Print within that directory
HASH
for j in *
do
if [ -f $j/$DEFAULT_PRINTER ]
then
PRINTERS=$j
HASH make the equivalent directory in the configuration
HASH directory
if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i ]
then
mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
fi
cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS ]
then
mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
fi
cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
HASH now copy the file over from the installation dirctory
HASH if it is not already present.
if [ ! -f $DEFAULT_PRINTER ]
then
cp $DT_TOP/$APPCONFIG/appmanager/$i/$PRINTERS/$DEFAULT_PRINTER .
fi
cd $DT_TOP/$APPCONFIG/appmanager/$i
fi
done
cd $DT_TOP/$APPCONFIG/appmanager
fi
done
HASH
HASH Configure Xsession.d
HASH
cd $DT_CONFIG_TOP/config
if [ ! -d Xsession.d ]
then
mkdir Xsession.d
fi
chmod -R 755 $DT_CONFIG_TOP
LinkOtherIcons
HASH
HASH mkProd can't seem to handle a mode of 2555 so
HASH do it here
HASH
chmod 2555 $DT_TOP/bin/dtmail
return $retval

View File

@@ -0,0 +1,88 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-SHLIBS
XCOMM customize
XCOMM @(#) $XConsortium: configShlibs.src /main/4 1996/04/23 19:33:43 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"
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
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,26 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-TT
XCOMM configure
XCOMM @(#) $XConsortium: configTT.src /main/4 1996/04/23 19:33:48 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
PRODUCT=CDE
FILESET=CDE-TT
retval=0
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f /etc/inetd.conf ] # highly unlikely
then
echo "" >/etc/inetd.conf
fi
return $retval

View File

@@ -0,0 +1,59 @@
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 USLArchitecture
PLATFORM = usl
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
#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

@@ -0,0 +1,236 @@
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/csh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -0,0 +1,438 @@
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/csh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -0,0 +1,166 @@
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

@@ -0,0 +1,239 @@
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/csh
else
/usr/sbin/inetd -s
fi
rm /tmp/tmppsout
fi
return $retval

View 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

File diff suppressed because it is too large Load Diff

View 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

View 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

View File

@@ -0,0 +1,52 @@
XCOMM $XConsortium: Imakefile /main/7 1996/04/21 19:07:13 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 USLArchitecture
PLATFORM = usl
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
#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 ../../../..
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
-D_POWER
AllTarget(configTT configMin configRun)
CppScriptTarget(configTT,configTT.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(configMin,configMin.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(configRun,configRun.src,$(LOCAL_CPP_DEFINES),)
clean::
$(RM) *.lst *.list

View File

@@ -0,0 +1,265 @@
XCOMM! /bin/ksh
XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
XCOMM @(#) $XConsortium: configMin.src /main/7 1996/04/23 10:35:44 drk $
XCOMM AIX cpp does not honor the usual requirement that preprocessor
XCOMM directives must begin in column one, so we must do more quoting.
#define HASH #
SERVICES=/etc/services
INETD=/etc/inetd.conf
AdddtspcToInetserv()
{
DTSPCD=CDE_INSTALLATION_TOP/bin/dtspcd
XCOMM
XCOMM check for existence of /etc/services
XCOMM
if [ ! -f $SERVICES ] # highly unlikely
then
echo "" >$SERVICES
fi
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f $INETD ] # highly unlikely
then
echo "" >$INETD
fi
#ifdef _POWER
/usr/sbin/chservices -a -v dtspc -p tcp -n 6112 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
exit 1
fi
/usr/sbin/chsubserver -a -v dtspc -t stream -p tcp -w nowait -u root \
-g $DTSPCD -r inetd $DTSPCD 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
exit 1
fi
#else
XCOMM
XCOMM Check if the server exists in the /etc/services file.
XCOMM
rc=`inetserv -s -S -v dtspc -p tcp 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" -ne "0" ]
then
XCOMM
XCOMM Add entry into /etc/services file
XCOMM
inetserv -a -S -v dtspc -p tcp -n 6112
fi
XCOMM
XCOMM Check if the server exists in the /etc/inetd.conf file.
XCOMM
rc=`inetserv -s -I -v dtspc -p tcp 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" -ne "0" ]
then
inetserv -a -I -v dtspc -p tcp -t stream -w nowait -U root \
-r $DTSPCD -R $DTSPCD 1>/dev/null 2>/dev/null
fi
XCOMM
XCOMM remove legacy entries like "dtspcd" if exist
XCOMM
rc=`inetserv -s -S -v dtspcd -p tcp 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" = "0" ]
then
inetserv -D -S -v dtspcd -p tcp
fi
#endif
}
CheckFordtspcService()
{
#ifdef _POWER
rc=`grep "dtspc" $SERVICES | cut -c1 | grep -xv "#" \
1>/dev/null 2>/dev/null;echo $?`
#else
rc=`inetserv -s -S -v dtspc -p tcp 1>/dev/null 2>/dev/null;echo $?`
#endif
return $rc
}
RemovedtspcFromInetserv()
{
DTSPCD=CDE_INSTALLATION_TOP/bin/dtspcd
#ifdef _POWER
/usr/sbin/chservices -d -v dtspc -p tcp -n 6112 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
exit 1
fi
/usr/sbin/chsubserver -d -v dtspc -t stream -p tcp -w nowait -u root \
-g $DTSPCD -r inetd $DTSPCD 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
exit 1
fi
#else
XCOMM
XCOMM Check if the server exists in the /etc/services file.
XCOMM
rc=`inetserv -s -S -v dtspc -p tcp 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" = "0" ]
then
inetserv -D -S -v dtspc -p tcp 2>/dev/null 1>/dev/null
fi
XCOMM
XCOMM remove legacy entries like "dtspcd" if exist
XCOMM
rc=`inetserv -s -S -v dtspcd -p tcp 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" = "0" ]
then
inetserv -D -S -v dtspcd -p tcp
fi
#endif
}
StopDaemon()
{
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill " $2}' /tmp/tmppsout | /bin/ksh 1>/dev/null
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 1>/dev/null
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 1>/dev/null
sleep 2
fi
fi
fi
rm -f /tmp/tmppsout
}
HandleOption()
{
while [ $# -ne 0 ]; do
case $1 in
-e) DO_CONFIGURATION="yes"
shift;
;;
-d) DO_CONFIGURATION="no"
shift;
;;
esac
done
}
XCOMM #################################################################
XCOMM
XCOMM Main body
XCOMM
XCOMM #################################################################
PRODUCT=CDE
FILESET=CDE-MIN
DO_CONFIGURATION=""
retval=0
#ifndef _POWER
XCOMM
XCOMM refresh the inetserv object class with the latest
XCOMM entries from /etc/inetd.conf and /etc/services files
XCOMM
inetexp
StopDaemon "dtspcd"
#endif
HandleOption $*
if [ "$DO_CONFIGURATION" = "yes" ]
then
#ifndef _POWER
XCOMM
XCOMM create the /var/dt/tmp directory for the dtspcd
XCOMM
if [ ! -d CDE_LOGFILES_TOP/tmp ]
then
mkdir -p CDE_LOGFILES_TOP/tmp
fi
#endif
CheckFordtspcService
rc=$?
if [ "$rc" -eq "0" ]
then
echo "\n dtspc is already enabled...\n"
exit 0
fi
AdddtspcToInetserv
#ifndef _POWER
XCOMM
XCOMM update inetd
XCOMM
inetimp
refresh -s inetd
#endif
elif [ "$DO_CONFIGURATION" = "no" ]
then
CheckFordtspcService
rc=$?
if [ "$rc" = "0" ]
then
RemovedtspcFromInetserv
else
echo "\n dtspc is already disabled...\n"
exit 0
fi
#ifndef _POWER
XCOMM
XCOMM update inetd
XCOMM
inetimp
refresh -s inetd
#endif
fi

View File

@@ -0,0 +1,661 @@
XCOMM! /bin/ksh
XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
XCOMM @(#) $XConsortium: configRun.src /main/7 1996/10/18 16:25:57 drk $
#define HASH #
#define STAR *
INETD=/etc/inetd.conf
XCOMM
XCOMM The "sm" object definitions for 410 are in /usr/lib/objrepos so
XCOMM ODMDIR need to get set to the correct path name .
XCOMM
#ifdef _POWER
ODMDIR=/usr/lib/objrepos
#endif
CreateAppConfigDirectory()
{
XCOMM
XCOMM Create the APPCONFIG directory inside DT_CONFIG_TOP and create
XCOMM all of its subdirectories
XCOMM
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
}
CheckFor24cmsdinInetd()
{
#ifdef _POWER
rc=`grep "cmsd" $INETD | grep "2-4" | cut -c1 | grep -xv "#" \
1>/dev/null 2>/dev/null; echo $?`
#else
rc=`inetserv -s -I -v cmsd -p udp | grep "2-4" 1>/dev/null 2>/dev/null;\
echo $?`
#endif
return $rc
}
CheckForcmsdinInetd()
{
#ifdef _POWER
rc=`grep "cmsd" $INETD | cut -c1 | grep -xv "#" \
1>/dev/null 2>/dev/null;echo $?`
#else
rc=`inetserv -s -I -v cmsd -p udp 1>/dev/null 2>/dev/null;echo $?`
#endif
return $rc
}
#ifndef _POWER
DeleteSmitStanzas()
{
odmdelete -o sm_cmd_opt -q"id='sysuiinterface'" 1>/dev/null 2>/dev/null
odmdelete -o sm_cmd_hdr -q"id='dtconfig'" 1>/dev/null 2>/dev/null
odmdelete -o sm_menu_opt -q"next_id='dtconfig'" 1>/dev/null 2>/dev/null
}
#endif
#ifndef _POWER
AddSmitStanzas()
{
rc=`odmget -q"next_id='dtconfig'" sm_menu_opt | grep dtconfig 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" -ne "0" ]
then
cat << odm_stanzas | odmadd
sm_menu_opt:
id_seq_num = "200"
id = "system"
next_id = "dtconfig"
text = "Change System User Interface"
text_msg_file = "dtsmit.cat"
text_msg_set = 30
text_msg_id = 1
next_type = "d"
alias = ""
help_msg_id = ""
help_msg_loc = ""
help_msg_base = ""
help_msg_book = ""
sm_menu_opt:
id_seq_num = "050"
id = "controls"
next_id = "dtconfig"
text = "Change System User Interface"
text_msg_file = "dtsmit.cat"
text_msg_set = 30
text_msg_id = 1
next_type = "d"
alias = ""
help_msg_id = ""
help_msg_loc = ""
help_msg_base = ""
help_msg_book = ""
odm_stanzas
fi
rc=`odmget -q"id='dtconfig'" sm_cmd_hdr | grep dtconfig 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" -ne "0" ]
then
cat << odm_stanzas | odmadd
sm_cmd_hdr:
id = "dtconfig"
option_id = "sysuiinterface"
has_name_select = ""
name = "Select System User Interface"
name_msg_file = "dtsmit.cat"
name_msg_set = 40
name_msg_id = 1
cmd_to_exec = "/usr/dt/bin/dtconfig "
ask = ""
exec_mode = ""
ghost = ""
cmd_to_discover = ""
cmd_to_discover_postfix = ""
name_size = 0
value_size = 0
help_msg_id = ""
help_msg_loc = ""
help_msg_base = ""
help_msg_book = ""
odm_stanzas
fi
rc=`odmget -q"id='sysuiinterface'" sm_cmd_opt | grep sysuiinterface 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" -ne "0" ]
then
cat << odm_stanzas | odmadd
sm_cmd_opt:
id_seq_num = "020"
id = "sysuiinterface"
disc_field_name = ""
name = "Select System Login User Interface"
name_msg_file = "dtsmit.cat"
name_msg_set = 50
name_msg_id = 1
op_type = "r"
entry_type = ""
entry_size = 0
required = "y"
prefix = ""
cmd_to_list_mode = ""
cmd_to_list = ""
cmd_to_list_postfix = ""
multi_select = ""
value_index = 0
disp_values = "CDE environment,Command line"
values_msg_file = ""
values_msg_set = 0
values_msg_id = 0
aix_values = "-e,-d"
help_msg_id = ""
help_msg_loc = ""
help_msg_base = ""
help_msg_book = ""
odm_stanzas
fi
}
#endif
XCOMM
XCOMM Checks if portmap daemon is already running; if not
XCOMM starts the portmap daemon.
XCOMM
CheckPortmap()
{
ps -ef | fgrep portmap | grep -v grep 2>/dev/null 1>/dev/null
if [ $? -ne 0 ]
then
startsrc -s portmap
fi
}
StopDaemon()
{
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill " $2}' /tmp/tmppsout | /bin/ksh 1>/dev/null
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 1>/dev/null
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 1>/dev/null
sleep 2
fi
fi
fi
rm -f /tmp/tmppsout
}
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" >>/tmp/etc-rpc
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
}
Remove24cmsdFromInetd()
{
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
#ifdef _POWER
/usr/sbin/chsubserver -d -v cmsd -t sunrpc_udp -p udp -w wait -u root \
-g $CMSD -r inetd cmsd 100068 2-4 1>/dev/null 2>/dev/null
grep -v "#cmsd" $INETD >/tmp/configRun.$$ && mv /tmp/configRun.$$ $INETD
#else
inetserv -D -I -v cmsd -p udp 2>/dev/null 1>/dev/null
#endif
if [ "$?" -ne "0" ]
then
exit 1
fi
}
RemovecmsdFromInetserv()
{
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
#ifdef _POWER
/usr/sbin/chsubserver -d -v cmsd -t sunrpc_udp -p udp -w wait -u root \
-g $CMSD -r inetd cmsd 100068 2-5 1>/dev/null 2>/dev/null
grep -v "#cmsd" $INETD >/tmp/configRun.$$ && mv /tmp/configRun.$$ $INETD
#else
inetserv -D -I -v cmsd -p udp 2>/dev/null 1>/dev/null
#endif
if [ "$?" -ne "0" ]
then
exit 1
fi
}
AddcmsdToInetserv()
{
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f $INETD ] # highly unlikely
then
echo "" >$INETD
fi
#ifdef _POWER
/usr/sbin/chsubserver -a -v cmsd -t sunrpc_udp -p udp -w wait -u root \
-g $CMSD -r inetd cmsd 100068 2-5 1>/dev/null 2>/dev/null
if [ "$?" -ne "0" ]
then
exit 1
fi
#else
XCOMM
XCOMM Check if the server exists in the /etc/inetd.conf file.
XCOMM
rc=`inetserv -s -I -v cmsd -p udp 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" -ne "0" ]
then
inetserv -a -S -v cmsd -p udp -n 111
rc=$?
if [ "$rc" -eq "0" ]
then
inetserv -a -I -v cmsd -p udp -t sunrpc_udp -w wait -U root \
-r $CMSD -R "cmsd 100068 2-5"
if [ "$?" = "1" ]
then
exit 1
fi
fi
fi
#endif
}
HandleOption()
{
while [ $# -ne 0 ]; do
case $1 in
-e) DO_CONFIGURATION="yes"
shift;
;;
-d) DO_CONFIGURATION="no"
shift;
;;
esac
done
}
LinkOtherIcons()
{
while read SRC
do
rm -f $DT_TOP/$APPCONFIG/icons/C/F$SRC
ln -s $DT_TOP/$APPCONFIG/icons/C/$SRC $DT_TOP/$APPCONFIG/icons/C/F$SRC
done <<-EOF
fphelp.t.pm
help.t.pm
paint.l.pm
paint.m.pm
paint.t.pm
penpad.t.pm
term.t.pm
EOF
}
ConfigurePrintersDir()
{
cd $DT_TOP/$APPCONFIG/appmanager
XCOMM
XCOMM for each locale
XCOMM
for i in *
do
if [ -d $i ]
then
cd $i
HASH
HASH for each directory in the locale, check for a
HASH localized version of the Printers directory
HASH and for the file lp_Print within that directory
HASH
for j in *
do
if [ -f $j/$DEFAULT_PRINTER ]
then
PRINTERS=$j
HASH make the equivalent directory in the configuration
HASH directory
if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i ]
then
mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
fi
cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS ]
then
mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
fi
cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
HASH now copy the file over from the installation dirctory
HASH if it is not already present.
if [ ! -f $DEFAULT_PRINTER ]
then
cp $DT_TOP/$APPCONFIG/appmanager/$i/$PRINTERS/$DEFAULT_PRINTER .
fi
cd $DT_TOP/$APPCONFIG/appmanager/$i
fi
done
cd $DT_TOP/$APPCONFIG/appmanager
fi
done
}
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-RUN
retval=0
DT_TOP=/usr/dt
DT_CONFIG_TOP=/etc/dt
DT_TEMP_TOP=/var/dt
DO_CONFIGURATION=""
ROOT=/
retval=0
APPCONFIG=appconfig
APPCONFIG_DIRS="appmanager help icons types"
PRINTERS=""
DEFAULT_PRINTER="DtPrint"
#ifndef _POWER
StopDaemon "rpc.cmsd"
#endif
HandleOption $*
if [ "$DO_CONFIGURATION" = "yes" ]
then
XCOMM
XCOMM create the /var/dt directory
XCOMM
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 * 2> /dev/null
chmod 755 .hidden-appmanager 2> /dev/null
chown -R bin * 2> /dev/null
chgrp -R bin * 2> /dev/null
mv .hidden-appmanager $APPCONFIG/appmanager
chmod 755 . 2> /dev/null
chown bin . 2> /dev/null
chgrp bin . 2> /dev/null
XCOMM
XCOMM create the /etc/dt and its config directory
XCOMM
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
ConfigurePrintersDir
env LANG=C /usr/dt/bin/dtprintinfo -populate
XCOMM
XCOMM Configure Xsession.d
XCOMM
cd $DT_CONFIG_TOP/config
if [ ! -d Xsession.d ]
then
mkdir Xsession.d
fi
cd $DT_CONFIG_TOP
chmod -R 755 *
LinkOtherIcons
#ifndef _POWER
AddSmitStanzas
#endif
FixEtcRpc
XCOMM After adding the Calendar Manager to the rpc service list the
XCOMM portmapper needs to be restarted.
#ifndef _POWER
CheckPortmap
#endif
CheckFor24cmsdinInetd
rc=$?
if [ "$rc" = "0" ]
then
Remove24cmsdFromInetd
#ifndef _POWER
inetimp
#endif
refresh -s inetd
fi
CheckForcmsdinInetd
rc=$?
if [ "$rc" = "0" ]
then
RemovecmsdFromInetserv
fi
AddcmsdToInetserv
#ifndef _POWER
XCOMM After adding the Calendar Manager to the inetd service list, the inet
XCOMM daemon needs to reread its configuration.
inetimp
refresh -s inetd
#endif
elif [ "$DO_CONFIGURATION" = "no" ]
then
#ifndef _POWER
DeleteSmitStanzas
#endif
UnfixEtcRpc
XCOMM After deleting the Calendar Manager to the rpc service list the
XCOMM portmapper needs to be restarted.
#ifndef _POWER
CheckPortmap
#endif
CheckForcmsdinInetd
rc=$?
if [ "$rc" = "0" ]
then
RemovecmsdFromInetserv
else
echo "\ncmsd is already disabled..\n"
exit 0
fi
#ifndef _POWER
XCOMM After adding the Calendar Manager to the inetd service list, the inet
XCOMM daemon needs to reread its configuration.
inetimp
refresh -s inetd
#endif
fi

View File

@@ -0,0 +1,291 @@
XCOMM! /bin/ksh
XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
XCOMM @(#) $XConsortium: configTT.src /main/5 1996/04/23 10:36:05 drk $
XCOMM AIX cpp does not honor the usual requirement that preprocessor
XCOMM directives must begin in column one, so we must do more quoting.
#define HASH #
INETD=/etc/inetd.conf
CheckForttinInetd()
{
#ifdef _POWER
grep "ttdbserverd" $INETD > /dev/null 2>&1 && sed "/ttdbserverd/d" $INETD > /tmp/configTT.$$ && mv /tmp/configTT.$$ $INETD
rc=`grep "ttdbserver" $INETD | cut -c1 | grep -xv "#" \
1>/dev/null 2>/dev/null;echo $?`
#else
rc=`inetserv -s -I -v ttdbserver -p tcp 1>/dev/null 2>/dev/null;echo $?`
#endif
return $rc
}
XCOMM
XCOMM Checks if portmap daemon is already running; if not
XCOMM starts the portmap daemon.
XCOMM
CheckPortmap()
{
ps -ef | fgrep portmap | grep -v grep 2>/dev/null 1>/dev/null
if [ $? -ne 0 ]
then
startsrc -s portmap
fi
}
StopDaemon()
{
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill " $2}' /tmp/tmppsout | /bin/ksh 1>/dev/null
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 1>/dev/null
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 1>/dev/null
sleep 2
fi
fi
fi
rm -f /tmp/tmppsout
}
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 "ttdbserver 100083 tooltalk" >$RPCFILE
else
HASH
HASH check to see if the entry is already there
HASH
grep "ttdbserverd" $RPCFILE > /dev/null 2>&1 && sed "/ttdbserverd/d" $RPCFILE > /tmp/configTTrpc.$$ && mv /tmp/configTTrpc.$$ $RPCFILE
awk '{if ($1 == "ttdbserver" && $2 == "100083")
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. If either one does they need to be commented
HASH out.
awk '{if (($1 == "ttdbserver" && $2 != "100083") ||
($2 == "100083" && $1 != "ttdbserver"))
print "#cde " $0;
else
print $0
}' $RPCFILE >$TMPFILE
echo "ttdbserver 100083 tooltalk" >>$TMPFILE
mv $TMPFILE $RPCFILE
else
rm /tmp/etc-rpc-already-there
fi
fi
}
UnfixEtcRpc()
{
FILE="/etc/rpc"
TMPFILE="/tmp/etc-rpc"
awk '{if ($1 == "ttdbserver" && $2 == "100083")
;
else if ($1 == "ttdbserverd" && $2 == "100083")
;
else
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
awk '{if ($1 == "#cde") {
$1 = $2
$2 = ""
}
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
}
RemovettFromInetserv()
{
TTDB=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
#ifdef _POWER
/usr/sbin/chsubserver -d -v ttdbserver -t sunrpc_tcp -p tcp -w wait -u root \
-g $TTDB -r inetd rpc.ttdbserver 100083 1 \
1>/dev/null 2>/dev/null
grep -v "#ttdbserver" $INETD >/tmp/configTT.$$ && cp /tmp/configTT.$$ $INETD
#else
inetserv -D -I -v ttdbserver -p tcp 2>/dev/null 1>/dev/null
#endif
if [ "$?" -ne "0" ]
then
exit 1
fi
}
AddttToInetserv()
{
INETD=/etc/inetd.conf
TTDB=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
XCOMM
XCOMM check for existence of /etc/inetd.conf
XCOMM
if [ ! -f $INETD ] # highly unlikely
then
echo "" >$INETD
fi
#ifdef _POWER
/usr/sbin/chsubserver -a -v ttdbserver -t sunrpc_tcp -p tcp -w wait -u root \
-g $TTDB -r inetd rpc.ttdbserver 100083 1 \
1>/dev/null 2>/dev/null
if [ "$?" -ne "0" ]
then
exit 1
fi
#else
XCOMM
XCOMM Check if the server exists in the /etc/inetd.conf file.
XCOMM
rc=`inetserv -s -I -v ttdbserver -p tcp 1>/dev/null 2>/dev/null;echo $?`
if [ "$rc" -ne "0" ]
then
inetserv -a -S -v ttdbserver -p tcp -n 111
rc=$?
if [ "$rc" -eq "0" ]
then
inetserv -a -I -v ttdbserver -p tcp -t sunrpc_tcp -w wait -U root \
-r $TTDB -R "rpc.ttdbserver 100083 1"
if [ "$?" = "1" ]
then
exit 1
fi
else
echo "Cannot add entries to inetd.conf..."
exit 1
fi
fi
#endif
}
HandleOption()
{
while [ $# -ne 0 ]; do
case $1 in
-e) DO_CONFIGURATION="yes"
shift;
;;
-d) DO_CONFIGURATION="no"
shift;
;;
esac
done
}
XCOMM ##################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##################################################################
DO_CONFIGURATION=""
PRODUCT=CDE
FILESET=CDE-TT
retval=0
#ifndef _POWER
StopDaemon "rpc.ttdbserver"
#endif
HandleOption $*
if [ "$DO_CONFIGURATION" = "yes" ]
then
FixEtcRpc
#ifndef _POWER
CheckPortmap
#endif
CheckForttinInetd
rc=$?
if [ "$rc" = "0" ]
then
RemovettFromInetserv
fi
AddttToInetserv
elif [ "$DO_CONFIGURATION" = "no" ]
then
UnfixEtcRpc
#ifndef _POWER
CheckPortmap
#endif
CheckForttinInetd
rc=$?
if [ "$rc" = "0" ]
then
RemovettFromInetserv
else
echo "\nToolTalk is already disabled..\n"
exit 0
fi
fi
#ifndef _POWER
if [ "$DO_CONFIGURATION" != "" ]
then
XCOMM After adding ToolTalk to the inetd service list the inet
XCOMM daemon needs to reread its configuration.
inetimp
refresh -s inetd
fi
#endif

View File

@@ -0,0 +1,59 @@
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
#ifdef USLArchitecture
PLATFORM = usl
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
#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,275 @@
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
echo "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
}
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 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
}
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
FixEtcPamDotConf
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
UnfixEtcPamDotConf
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/csh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -0,0 +1,322 @@
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 100068/2-4 dgram rpc/udp 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
nawk -v cmsd=$CMSD \
'{if ($1 == "100068/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 == "100068/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 == "100068/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 "100068/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 rpc.cmsd entry
nawk -v cmsd=$CMSD \
'{if (($1 == "100068/2-4" || $1 == "100068/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 == "100068/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
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
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 /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
doDttermTerminfo
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
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -0,0 +1,105 @@
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
VerifyInstalledFiles
elif [ "$OPERATION" = "configure" ]
then
MakeTheLink
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,166 @@
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.ttdbserverd
XCOMM
XCOMM see if it already exists
XCOMM
nawk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 != ttdb)
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "100083/1")
print $0 > "/tmp/tt-already-there"
}' $FILE >/dev/null
if [ ! -f /tmp/tt-already-there ]
then
echo "100083/1 stream rpc/tcp 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.ttdbserverd
nawk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 == ttdb)
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "#cde" && ($2 == "100083/1" || $2 == "100083")) {
$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
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/csh
else
/usr/sbin/inetd -s
fi
rm /tmp/tmppsout
fi
return $retval

View File

@@ -0,0 +1,20 @@
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
}

View File

@@ -0,0 +1,14 @@
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

View File

@@ -0,0 +1,56 @@
XCOMM $XConsortium: Imakefile /main/6 1996/04/21 19:07:26 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 USLArchitecture
PLATFORM = usl
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
#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,275 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MIN
XCOMM configure
XCOMM @(#) $XConsortium: configMin.src /main/6 1996/04/23 20:38:34 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\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 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
}
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
FixEtcPamDotConf
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
UnfixEtcPamDotConf
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/csh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -0,0 +1,322 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-RUN
XCOMM configure
XCOMM @(#) $XConsortium: configRun.src /main/6 1996/10/18 16:26:20 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 100068/2-4 dgram rpc/udp 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
nawk -v cmsd=$CMSD \
'{if ($1 == "100068/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 == "100068/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 == "100068/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 "100068/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 rpc.cmsd entry
nawk -v cmsd=$CMSD \
'{if (($1 == "100068/2-4" || $1 == "100068/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 == "100068/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
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
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 /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
doDttermTerminfo
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
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh
else
/usr/sbin/inetd -s
fi
fi
return $retval

View File

@@ -0,0 +1,105 @@
XCOMM!/bin/ksh
XCOMM $XConsortium: configShlibs.src /main/4 1996/06/13 16:06:34 drk $
#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
VerifyInstalledFiles
elif [ "$OPERATION" = "configure" ]
then
MakeTheLink
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,166 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-TT
XCOMM configure
XCOMM @(#) $XConsortium: configTT.src /main/5 1996/04/23 20:38:48 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.ttdbserverd
XCOMM
XCOMM see if it already exists
XCOMM
nawk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 != ttdb)
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "100083/1")
print $0 > "/tmp/tt-already-there"
}' $FILE >/dev/null
if [ ! -f /tmp/tt-already-there ]
then
echo "100083/1 stream rpc/tcp 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.ttdbserverd
nawk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 == ttdb)
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "#cde" && ($2 == "100083/1" || $2 == "100083")) {
$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
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/csh
else
/usr/sbin/inetd -s
fi
rm /tmp/tmppsout
fi
return $retval

View File

@@ -0,0 +1,57 @@
XCOMM $XConsortium: Imakefile /main/5 1996/04/21 19:07:43 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 USLArchitecture
PLATFORM = usl
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
#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,53 @@
#!/bin/sh
#
# Start X Display Manager for CDE
#
XNETACCESS=on #!@ Do not edit this line !@
XWINHOME=/usr/X export XWINHOME #!@ (or your mount point) !@
DTHOME=/usr/dt
PATH=$PATH:$XWINHOME/bin:$DTHOME/bin export PATH #!@ Do not edit this line !@
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DTHOME/lib:$XWINHOME/lib export LD_LIBRARY_PATH #!@ Do not edit this line !@
XUSL=/usr/X/bin/X
XDMPROG="$DTHOME/bin/dtlogin"
XDM="$XDMPROG -daemon"
# Installed by els.4.2 package instance
XNLSPATH=$XWINHOME/lib/nls/elsXsi # Installed by els.4.2 package instance
XMODIFIERS=@im=Local # Installed by els.4.2 package instance
export XNLSPATH XMODIFIERS # Installed by els.4.2 package instance
KillProgram()
{
if [ "$#" -ne 2 ]
then
echo "usage: KillProgram -signal program-name"
fi
SIGNAL=$1
PROGRAM=$2
/bin/ps -ef | grep "$2" | grep -v grep >/tmp/tmppsout
if test -s /tmp/tmppsout
then
awk "{print \"kill $1 \" \$2}" /tmp/tmppsout | /bin/ksh
fi
rm -f /tmp/tmppsout
}
case "$1" in
start)
if test -x $XDMPROG; then
if test -x $XUSL; then
rm -rf /var/dt/Xpid
exec $XDM
fi
fi
;;
stop)
KillProgram -15 dtlogin
;;
*)
echo "usage: S69xdm {start|stop}"
;;
esac

View File

@@ -0,0 +1,67 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-HELP
XCOMM customize
XCOMM @(#) $XConsortium: configHelp.src /main/5 1996/04/23 19:56:20 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
XCOMM #
XCOMM # HELP_symlinks
XCOMM #
XCOMM # create various symlinks
XCOMM #
XCOMM ############################################
HELP_symlinks()
{
HELP_LOC="appconfig/help"
theLANG="C"
DESTDIR=$CDE_CONF_TOP/$HELP_LOC/$theLANG
SRCDIR=$CDE_TOP/$HELP_LOC/$theLANG
EXT=".sdl"
[ -d $DESTDIR ] || mkdir -p $DESTDIR
for j in $CDE_TOP/$HELP_LOC/$theLANG/STAR
do
thedir=`basename $j`
if [[ -d $j && -f $j/${thedir}$EXT ]]
then
rm -f $DESTDIR/${thedir}$EXT
ln -s $j/${thedir}$EXT $DESTDIR/${thedir}$EXT
fi
done
for j in $CDE_TOP/$HELP_LOC/$theLANG/STAR.hf
do
thefile=`basename $j`
rm -f $DESTDIR/$thefile
ln -s $CDE_TOP/$HELP_LOC/$theLANG/$thefile $DESTDIR/$thefile
done
}
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
XCOMM
XCOMM set up symlinks that point into the $CDE_TOP tree
XCOMM
HELP_symlinks
return $retval

View File

@@ -0,0 +1,65 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-HELP
XCOMM customize
XCOMM @(#) $XConsortium: configHelpPrg.src /main/5 1996/04/23 19:56:25 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
XCOMM #
XCOMM # HELP_symlinks
XCOMM #
XCOMM # create various symlinks
XCOMM #
XCOMM ############################################
HELP_symlinks()
{
DEST_HELP_LOC="appconfig/help"
SRC_HELP_LOC="dthelp/help"
theLang="C"
DESTDIR=$CDE_CONF_TOP/$DEST_HELP_LOC/$theLang
SRCDIR=$CDE_TOP/$SRC_HELP_LOC/$theLang
[ -d $DESTDIR ] || mkdir -p $DESTDIR
for j in $SRCDIR/STAR
do
dir=`basename $j`
for k in $j/STAR
do
file=`basename $k`
EXT=${file##*\.}
if [[ "$EXT" = "sdl" || "$EXT" = "hf" ]]
then
rm -f $DESTDIR/$file
ln -s $SRCDIR/$dir/$file $DESTDIR/$file
fi
done
done
}
XCOMM #############################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM #############################################################################
PRODUCT=CDE
FILESET=CDE-HELP
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
XCOMM
XCOMM set up symlinks that point into the $CDE_TOP tree
XCOMM
HELP_symlinks
return $retval

View File

@@ -0,0 +1,197 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MIN
XCOMM configure
XCOMM @(#) $XConsortium: configMin.src /main/4 1996/04/21 19:07:50 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
PRODUCT=CDE
FILESET=CDE-MIN
DO_CONFIGURATION=""
retval=0
CheckForClobberedLinks()
{
XCOMM
XCOMM ensure links not clobbered
XCOMM
for file in services inetd.conf
do
if test ! -L /etc/$file
then if test -f /etc/$file
then
rm /etc/$file
ln -s /etc/inet/$file /etc/$file
fi
fi
done
}
FixEtcInetServices()
{
SERVICES=/etc/inet/services
XCOMM
XCOMM see if it already exists
XCOMM
nawk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
$SERVICES >/dev/null
if [ ! -f /tmp/dtspc-already-there ]
then
if test ! -f ${SERVICES}.preCDE
then mv $SERVICES $SERVICES.preCDE
cp ${SERVICES}.preCDE $SERVICES
chmod 444 $SERVICES
fi
echo "dtspc\t6112/tcp\t#subprocess control" >>$SERVICES
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
nawk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
$SERVICES >/tmp/etc-services
mv /tmp/etc-services $SERVICES
chmod 444 $SERVICES
}
UnfixEtcInetServices()
{
SERVICES=/etc/inet/services
TMPFILE=/tmp/etc-services
nawk '{if ($1 == "dtspc" && $2 == "6112/tcp")
;
else
print $0
}' $SERVICES >$TMPFILE
mv $TMPFILE $SERVICES
}
FixInetdDotConf()
{
INETD_CONF=/etc/inet/inetd.conf
XCOMM
XCOMM see if it already exists
XCOMM
nawk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
$INETD_CONF >/dev/null
if [ ! -f /tmp/dtspc-already-there ]
then
if test ! -f ${INETD_CONF}.preCDE
then mv $INETD_CONF $INETD_CONF.preCDE
cp ${INETD_CONF}.preCDE $INETD_CONF
chmod 444 $INETD_CONF
fi
DTSPCD=CDE_INSTALLATION_TOP/bin/dtspcd
echo "dtspc stream tcp nowait root $DTSPCD $DTSPCD" >>$INETD_CONF
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
nawk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
$INETD_CONF >/tmp/etc-inetd-conf
mv /tmp/etc-inetd-conf $INETD_CONF
chmod 444 $INETD_CONF
}
UnfixInetdDotConf()
{
INETD_CONF=/etc/inet/inetd.conf
TMPFILE=/tmp/inetd.conf
nawk '{if ($1 == "dtspc")
;
else
print $0
}' $INETD_CONF >$TMPFILE
mv $TMPFILE $INETD_CONF
}
PokeInetd()
{
XCOMM issue a SIGHUP to the inetd process
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
nawk '{print "kill -HUP " $2}' /tmp/tmppsout | /bin/ksh
else
/usr/sbin/inetd -s
fi
rm /tmp/tmppsout
}
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 ####################################################################
CheckForClobberedLinks
HandleOption $*
if [ "$OPERATION" = "configure" ]
then
FixEtcInetServices
FixInetdDotConf
PokeInetd()
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixEtcInetServices
UnfixInetdDotConf
PokeInetd()
RemoveMinFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,306 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-RUN
XCOMM configure
XCOMM @(#) $XConsortium: configRun.src /main/7 1996/10/18 16:26:43 drk $
XCOMM #######
#define HASH #
#define STAR *
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
}
FixInetdDotConf()
{
FILE="/etc/inet/inetd.conf"
TMPFILE="/tmp/inetd.conf"
XCOMM
XCOMM desired inetd.conf entry:
XCOMM 100068/2-4 dgram rpc/udp wait root CDE_INSTALLATION_TOP/bin/rpc.cmsd
XCOMM rpc.cmsd
XCOMM
XCOMM
XCOMM ensure links not clobbered
XCOMM
for file in services inetd.conf
do
if test ! -L /etc/$file
then if test -f /etc/$file
then
rm /etc/$file
ln -s /etc/inet/$file /etc/$file
fi
fi
done
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
nawk -v cmsd=$CMSD \
'{if ($1 == "100068/2-4" && $6 != cmsd)
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
if test ! -f ${FILE}.preCDE
then mv $FILE ${FILE}.preCDE
cp ${FILE}.preCDE $FILE
fi
mv $TMPFILE $FILE
chmod 444 $FILE
XCOMM
XCOMM now see if there is an occurrence of cmsd
XCOMM
rm -f /tmp/cmsd-already-there
nawk '{if ($7 == "rpc.cmsd" && $1 == "100068/2-4") 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 "100068/2-4 dgram rpc/udp wait root $CMSD rpc.cmsd" >>$FILE
else
rm /tmp/cmsd-already-there
fi
}
UnfixInetdDotConf()
{
FILE=/etc/inet/inetd.conf
TMPFILE=/tmp/inetd.conf
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
nawk -v cmsd=$CMSD \
'{if ($1 == "100068/2-4" && $6 == cmsd)
;
else
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
nawk '{if ($1 == "#cde" && $2 == "100068/2-4") {
$1 = $2;
$2 = ""
}
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
}
PokeInetd()
{
XCOMM
XCOMM Schedule inetd to re-read inetd.conf with SIGHUP.
XCOMM
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if test -s /tmp/tmppsout
then
nawk '{print "kill -HUP " $2}' /tmp/tmppsout | /bin/ksh
else
/usr/sbin/inetd -s
fi
rm -f /tmp/tmppsout
}
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
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
retval=0
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"
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 Create default printer actions
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
PokeInetd
doDttermTerminfo
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixInetdDotConf
PokeInetd
RemoveRunFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,114 @@
XCOMM!/bin/ksh
XCOMM $XConsortium: configShlibs.src /main/6 1996/06/13 16:38:59 drk $
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1996 International Business Machines Corp.
XCOMM (c) Copyright 1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
#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: configShlibs
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
echo " Creating symlink for $lib"
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
VerifyInstalledFiles
elif [ "$OPERATION" = "configure" ]
then
MakeTheLink
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,101 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-TT
XCOMM configure
XCOMM @(#) $XConsortium: configTT.src /main/5 1996/04/21 19:08:00 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
PRODUCT=CDE
FILESET=CDE-TT
DO_CONFIGURATION=""
retval=0
DeconfigureTtDbserver()
{
/usr/sbin/pmadm -d -p tcp -s ttdbserverd >/dev/null 2>&1
/usr/sbin/pmadm -r -p tcp -s ttdbserverd >/dev/null 2>&1
/usr/sbin/sacadm -x -p tcp
}
ConfigureTtDbserver()
{
/usr/sbin/pmadm -d -p tcp -s ttdbserverd >/dev/null 2>&1
/usr/sbin/pmadm -r -p tcp -s ttdbserverd >/dev/null 2>&1
/usr/sbin/pmadm -a -t listen -s ttdbserverd -i root -m `/usr/sbin/nlsadmin -c /usr/dt/bin/rpc.ttdbserverd -D -R 100083:1` -v `/usr/sbin/nlsadmin -V`
/usr/sbin/sacadm -x -p tcp
}
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
ConfigureTtDbserver
elif [ "$OPERATION" = "deconfigure" ]
then
DeconfigureTtDbserver
RemoveTTFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,55 @@
XCOMM $XConsortium: Imakefile /main/3 1996/04/21 19:13:20 drk $
TOOL_DIR = ../../dbTools
DATABASE_DIR = ../../../../databases
#ifdef HPArchitecture
PLATFORM = hp-ux
#endif
#ifdef RsArchitecture
PLATFORM = aix
#endif
#ifdef SunArchitecture
PLATFORM = sun
#endif
#ifdef USLArchitecture
PLATFORM = usl
#endif
#ifdef UXPArchitecture
PLATFORM = uxp
#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,53 @@
#!/bin/sh
#
# Start X Display Manager for CDE
#
XNETACCESS=on #!@ Do not edit this line !@
XWINHOME=/usr/X export XWINHOME #!@ (or your mount point) !@
DTHOME=/usr/dt
PATH=$PATH:$XWINHOME/bin:$DTHOME/bin export PATH #!@ Do not edit this line !@
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DTHOME/lib:$XWINHOME/lib export LD_LIBRARY_PATH #!@ Do not edit this line !@
XUXP=/usr/X/bin/X
XDMPROG="$DTHOME/bin/dtlogin"
XDM="$XDMPROG -daemon"
# Installed by els.4.2 package instance
XNLSPATH=$XWINHOME/lib/nls/elsXsi # Installed by els.4.2 package instance
XMODIFIERS=@im=Local # Installed by els.4.2 package instance
export XNLSPATH XMODIFIERS # Installed by els.4.2 package instance
KillProgram()
{
if [ "$#" -ne 2 ]
then
echo "usage: KillProgram -signal program-name"
fi
SIGNAL=$1
PROGRAM=$2
/bin/ps -ef | grep "$2" | grep -v grep >/tmp/tmppsout
if test -s /tmp/tmppsout
then
awk "{print \"kill $1 \" \$2}" /tmp/tmppsout | /bin/ksh
fi
rm -f /tmp/tmppsout
}
case "$1" in
start)
if test -x $XDMPROG; then
if test -x $XUXP; then
rm -rf /var/dt/Xpid
exec $XDM
fi
fi
;;
stop)
KillProgram -15 dtlogin
;;
*)
echo "usage: S69xdm {start|stop}"
;;
esac

View File

@@ -0,0 +1,67 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-HELP
XCOMM customize
XCOMM @(#) $XConsortium: configHelp.src /main/4 1996/07/18 15:49:15 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
XCOMM #
XCOMM # HELP_symlinks
XCOMM #
XCOMM # create various symlinks
XCOMM #
XCOMM ############################################
HELP_symlinks()
{
HELP_LOC="appconfig/help"
theLANG="C"
DESTDIR=$CDE_CONF_TOP/$HELP_LOC/$theLANG
SRCDIR=$CDE_TOP/$HELP_LOC/$theLANG
EXT=".sdl"
[ -d $DESTDIR ] || mkdir -p $DESTDIR
for j in $CDE_TOP/$HELP_LOC/$theLANG/STAR
do
thedir=`basename $j`
if [[ -d $j && -f $j/${thedir}$EXT ]]
then
rm -f $DESTDIR/${thedir}$EXT
ln -s $j/${thedir}$EXT $DESTDIR/${thedir}$EXT
fi
done
for j in $CDE_TOP/$HELP_LOC/$theLANG/STAR.hf
do
thefile=`basename $j`
rm -f $DESTDIR/$thefile
ln -s $CDE_TOP/$HELP_LOC/$theLANG/$thefile $DESTDIR/$thefile
done
}
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
XCOMM
XCOMM set up symlinks that point into the $CDE_TOP tree
XCOMM
HELP_symlinks
return $retval

View File

@@ -0,0 +1,65 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-HELP
XCOMM customize
XCOMM @(#) $XConsortium: configHelpPrg.src /main/4 1996/07/18 15:49:38 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
XCOMM #
XCOMM # HELP_symlinks
XCOMM #
XCOMM # create various symlinks
XCOMM #
XCOMM ############################################
HELP_symlinks()
{
DEST_HELP_LOC="appconfig/help"
SRC_HELP_LOC="dthelp/help"
theLang="C"
DESTDIR=$CDE_CONF_TOP/$DEST_HELP_LOC/$theLang
SRCDIR=$CDE_TOP/$SRC_HELP_LOC/$theLang
[ -d $DESTDIR ] || mkdir -p $DESTDIR
for j in $SRCDIR/STAR
do
dir=`basename $j`
for k in $j/STAR
do
file=`basename $k`
EXT=${file##*\.}
if [[ "$EXT" = "sdl" || "$EXT" = "hf" ]]
then
rm -f $DESTDIR/$file
ln -s $SRCDIR/$dir/$file $DESTDIR/$file
fi
done
done
}
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
XCOMM
XCOMM set up symlinks that point into the $CDE_TOP tree
XCOMM
HELP_symlinks
return $retval

View File

@@ -0,0 +1,197 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MIN
XCOMM configure
XCOMM @(#) $XConsortium: configMin.src /main/2 1996/04/21 19:13:28 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
PRODUCT=CDE
FILESET=CDE-MIN
DO_CONFIGURATION=""
retval=0
CheckForClobberedLinks()
{
XCOMM
XCOMM ensure links not clobbered
XCOMM
for file in services inetd.conf
do
if test ! -L /etc/$file
then if test -f /etc/$file
then
rm /etc/$file
ln -s /etc/inet/$file /etc/$file
fi
fi
done
}
FixEtcInetServices()
{
SERVICES=/etc/inet/services
XCOMM
XCOMM see if it already exists
XCOMM
nawk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
$SERVICES >/dev/null
if [ ! -f /tmp/dtspc-already-there ]
then
if test ! -f ${SERVICES}.preCDE
then mv $SERVICES $SERVICES.preCDE
cp ${SERVICES}.preCDE $SERVICES
chmod 444 $SERVICES
fi
echo "dtspc\t6112/tcp\t#subprocess control" >>$SERVICES
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
nawk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
$SERVICES >/tmp/etc-services
mv /tmp/etc-services $SERVICES
chmod 444 $SERVICES
}
UnfixEtcInetServices()
{
SERVICES=/etc/inet/services
TMPFILE=/tmp/etc-services
nawk '{if ($1 == "dtspc" && $2 == "6112/tcp")
;
else
print $0
}' $SERVICES >$TMPFILE
mv $TMPFILE $SERVICES
}
FixInetdDotConf()
{
INETD_CONF=/etc/inet/inetd.conf
XCOMM
XCOMM see if it already exists
XCOMM
nawk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
$INETD_CONF >/dev/null
if [ ! -f /tmp/dtspc-already-there ]
then
if test ! -f ${INETD_CONF}.preCDE
then mv $INETD_CONF $INETD_CONF.preCDE
cp ${INETD_CONF}.preCDE $INETD_CONF
chmod 444 $INETD_CONF
fi
DTSPCD=CDE_INSTALLATION_TOP/bin/dtspcd
echo "dtspc stream tcp nowait root $DTSPCD $DTSPCD" >>$INETD_CONF
else
rm /tmp/dtspc-already-there
fi
XCOMM
XCOMM remove legacy entries like dtspcd
XCOMM
nawk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
$INETD_CONF >/tmp/etc-inetd-conf
mv /tmp/etc-inetd-conf $INETD_CONF
chmod 444 $INETD_CONF
}
UnfixInetdDotConf()
{
INETD_CONF=/etc/inet/inetd.conf
TMPFILE=/tmp/inetd.conf
nawk '{if ($1 == "dtspc")
;
else
print $0
}' $INETD_CONF >$TMPFILE
mv $TMPFILE $INETD_CONF
}
PokeInetd()
{
XCOMM issue a SIGHUP to the inetd process
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
nawk '{print "kill -HUP " $2}' /tmp/tmppsout | /bin/ksh
else
/usr/sbin/inetd -s
fi
rm /tmp/tmppsout
}
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 ####################################################################
CheckForClobberedLinks
HandleOption $*
if [ "$OPERATION" = "configure" ]
then
FixEtcInetServices
FixInetdDotConf
PokeInetd()
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixEtcInetServices
UnfixInetdDotConf
PokeInetd()
RemoveMinFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,306 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-RUN
XCOMM configure
XCOMM @(#) $XConsortium: configRun.src /main/5 1996/10/18 16:27:01 drk $
XCOMM #######
#define HASH #
#define STAR *
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
}
FixInetdDotConf()
{
FILE="/etc/inet/inetd.conf"
TMPFILE="/tmp/inetd.conf"
XCOMM
XCOMM desired inetd.conf entry:
XCOMM 100068/2-4 dgram rpc/udp wait root CDE_INSTALLATION_TOP/bin/rpc.cmsd
XCOMM rpc.cmsd
XCOMM
XCOMM
XCOMM ensure links not clobbered
XCOMM
for file in services inetd.conf
do
if test ! -L /etc/$file
then if test -f /etc/$file
then
rm /etc/$file
ln -s /etc/inet/$file /etc/$file
fi
fi
done
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
nawk -v cmsd=$CMSD \
'{if ($1 == "100068/2-4" && $6 != cmsd)
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
if test ! -f ${FILE}.preCDE
then mv $FILE ${FILE}.preCDE
cp ${FILE}.preCDE $FILE
fi
mv $TMPFILE $FILE
chmod 444 $FILE
XCOMM
XCOMM now see if there is an occurrence of cmsd
XCOMM
rm -f /tmp/cmsd-already-there
nawk '{if ($7 == "rpc.cmsd" && $1 == "100068/2-4") 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 "100068/2-4 dgram rpc/udp wait root $CMSD rpc.cmsd" >>$FILE
else
rm /tmp/cmsd-already-there
fi
}
UnfixInetdDotConf()
{
FILE=/etc/inet/inetd.conf
TMPFILE=/tmp/inetd.conf
CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
nawk -v cmsd=$CMSD \
'{if ($1 == "100068/2-4" && $6 == cmsd)
;
else
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
nawk '{if ($1 == "#cde" && $2 == "100068/2-4") {
$1 = $2;
$2 = ""
}
print $0
}' $FILE >$TMPFILE
mv $TMPFILE $FILE
}
PokeInetd()
{
XCOMM
XCOMM Schedule inetd to re-read inetd.conf with SIGHUP.
XCOMM
ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
if test -s /tmp/tmppsout
then
nawk '{print "kill -HUP " $2}' /tmp/tmppsout | /bin/ksh
else
/usr/sbin/inetd -s
fi
rm -f /tmp/tmppsout
}
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
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
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
retval=0
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"
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 Create default printer actions
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
PokeInetd
doDttermTerminfo
elif [ "$OPERATION" = "deconfigure" ]
then
UnfixInetdDotConf
PokeInetd
RemoveRunFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,114 @@
XCOMM!/bin/ksh
XCOMM $XConsortium: configShlibs.src /main/5 1996/06/13 16:39:07 drk $
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1996 International Business Machines Corp.
XCOMM (c) Copyright 1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
#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: configShlibs
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
echo " Creating symlink for $lib"
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
VerifyInstalledFiles
elif [ "$OPERATION" = "configure" ]
then
MakeTheLink
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval

View File

@@ -0,0 +1,166 @@
XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-TT
XCOMM configure
XCOMM @(#) $XConsortium: configTT.src /main/5 1996/09/20 18:22:32 cde-fuj $
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.ttdbserverd
XCOMM
XCOMM see if it already exists
XCOMM
nawk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 != ttdb)
print "#cde " $0;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "100083/1")
print $0 > "/tmp/tt-already-there"
}' $FILE >/dev/null
if [ ! -f /tmp/tt-already-there ]
then
echo "100083/1 tli rpc/tcp 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.ttdbserverd
nawk -v ttdb=$TTDBSERVERD \
'{if ($1 == "100083/1" && $6 == ttdb)
;
else
print $0
}' $FILE >$TMPFILE
cp $TMPFILE $FILE
rm $TMPFILE
awk '{if ($1 == "#cde" && ($2 == "100083/1" || $2 == "100083")) {
$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
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/csh
else
/usr/sbin/inetd -s
fi
rm /tmp/tmppsout
fi
return $retval

View File

@@ -0,0 +1,68 @@
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