mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
commit
83b6996daa
18978 changed files with 3945623 additions and 0 deletions
44
cde/admin/IntegTools/Imakefile
Normal file
44
cde/admin/IntegTools/Imakefile
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
XCOMM $XConsortium: Imakefile /main/5 1996/04/21 19:06:35 drk $
|
||||
#define IHaveSubdirs
|
||||
#define PassCDebugFlags
|
||||
|
||||
SUBDIRS = post_install dbTools updateTools
|
||||
|
||||
#ifdef RsArchitecture
|
||||
OVERRIDE=install.dt.ibm
|
||||
#endif
|
||||
|
||||
#ifdef HPArchitecture
|
||||
OVERRIDE=install.dt.hp
|
||||
#endif
|
||||
|
||||
#ifdef SunArchitecture
|
||||
LOCAL_CPP_DEFINES=-Usun
|
||||
OVERRIDE=install.dt.sun
|
||||
#endif
|
||||
|
||||
#ifdef UXPArchitecture
|
||||
LOCAL_CPP_DEFINES=-Uuxp
|
||||
OVERRIDE=install.dt.uxp
|
||||
#endif
|
||||
|
||||
#ifdef USLArchitecture
|
||||
LOCAL_CPP_DEFINES=-Uusl
|
||||
OVERRIDE=install.dt.usl
|
||||
#endif
|
||||
|
||||
#ifdef AlphaArchitecture
|
||||
OVERRIDE=install.dt.dec
|
||||
#endif
|
||||
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
|
||||
AllTarget(install.dt $(OVERRIDE) dinstall.dt)
|
||||
|
||||
CppScriptTarget(install.dt,install.dt.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget($(OVERRIDE),$(OVERRIDE).src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(dinstall.dt,dinstall.dt.src,$(LOCAL_CPP_DEFINES),)
|
||||
|
||||
depend::
|
||||
|
||||
213
cde/admin/IntegTools/config/config.dec
Normal file
213
cde/admin/IntegTools/config/config.dec
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
####################################################
|
||||
### Configuration Instructions for DEC OSF1 Systems ###
|
||||
####################################################
|
||||
|
||||
|
||||
FIXME FIXME: Need to change this. Discuss /sbin/init.d/xdm script
|
||||
and its operation.... -mcb
|
||||
|
||||
|
||||
|
||||
There are two ways to start the desktop:
|
||||
|
||||
|
||||
* You can manually start the desktop Login Manager. The advantage
|
||||
of using this method is that you will not have to edit
|
||||
/etc/inittab.
|
||||
|
||||
* You can enable the system to automatically start the desktop
|
||||
when the system is rebooted. This is done by editing
|
||||
/etc/inittab.
|
||||
|
||||
Removing the Developer's Conference CDE Desktop
|
||||
===============================================
|
||||
|
||||
It is imperative that Snapshot 1 and Snapshot 2 desktops do not
|
||||
co-mingle. Installers and users should ensure that old clients and
|
||||
configuration files are exited or removed.
|
||||
|
||||
|
||||
Upgrading systems in a networked environment
|
||||
--------------------------------------------
|
||||
|
||||
If CDE is installed in a network environment, it is imperative that
|
||||
all systems be upgraded at the same time.
|
||||
|
||||
|
||||
Removing the Snapshot 1 desktop
|
||||
-------------------------------
|
||||
|
||||
Installers are advised to remove the Snapshot 1 Desktop files from
|
||||
their systems. Those clients and files are obsolete.
|
||||
|
||||
|
||||
Stopping Desktop clients before installing Snapshot 2
|
||||
-----------------------------------------------------
|
||||
|
||||
If the Snapshot 1 desktop is not removed, ensure that all desktop
|
||||
clients are inactive before installing the Snapshot 2 desktop. If the
|
||||
desktop was started via /etc/inittab, issue the telinit command to
|
||||
stop dtlogin and any other desktop client.
|
||||
|
||||
|
||||
Removing the users's .dtprofile and .dt directory
|
||||
-------------------------------------------------
|
||||
|
||||
It is strongly advised that all CDE users on the system remove or
|
||||
rename their .dt directory and their .dtprofile. The Snapshot 2
|
||||
Desktop is not compatible with the Snapshot 1 Desktop versions of
|
||||
these files.
|
||||
|
||||
If users have customized their .dt/dtwmrc file and want to keep it,
|
||||
they will need to cut and paste the appropriate pieces into the new
|
||||
dtwmrc provided.
|
||||
|
||||
|
||||
|
||||
Before You Start the Desktop (HP-UX)
|
||||
======================================
|
||||
|
||||
Special Configurations
|
||||
----------------------
|
||||
|
||||
If your system has one of these special configurations, you may need to
|
||||
edit certain Login Manager files before starting the desktop. See
|
||||
chapter 2 of the Getting Started Guide:
|
||||
|
||||
|
||||
* If the system console is a non-bitmap device.
|
||||
|
||||
* If the system is an X terminal or a host for X terminals.
|
||||
|
||||
* If the system has more than one display.
|
||||
|
||||
|
||||
|
||||
The Subprocess Control Daemon
|
||||
=============================
|
||||
|
||||
If you are working in an environment where a CDE Desktop action needs
|
||||
to start an application on another workstation running CDE, the
|
||||
Subprocess Control Daemon configuration must be completed on both
|
||||
workstations.
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. For authentication, the user's home directory on a remote system
|
||||
must be mounted to the local system.
|
||||
|
||||
3. To run an application with a WINDOW_TYPE of NO_STDIO (see Appendix
|
||||
A, Advanced User's and System Administrator's Guide), you will need
|
||||
to provide NFS-access by the local (client) system to the remote
|
||||
(application server) system's /var directory (if /var is a distinct
|
||||
volume), or / directory (if it is not). The mount point must be
|
||||
/nfs/<remote_host>/var (again, if /var is a distinct volume) or
|
||||
/nfs/<remote_host>/ (if it is not). Export the appropriate
|
||||
directory in /etc/exports on both the local and remote hosts.
|
||||
|
||||
|
||||
To Start And Stop the Desktop Manually
|
||||
======================================
|
||||
|
||||
To Start the Desktop:
|
||||
--------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. Enter:
|
||||
|
||||
/usr/dt/bin/dtlogin -daemon
|
||||
|
||||
This starts the Login Manager and displays the Login screen.
|
||||
Logging in starts a desktop session.
|
||||
|
||||
To Stop the Desktop:
|
||||
--------------------
|
||||
|
||||
When you stop the Login Manager, you automatically kill all
|
||||
X servers and desktop sessions that it started.
|
||||
|
||||
1. In a terminal emulator window, log in as root.
|
||||
|
||||
2. Obtain the process id of the parent Login Manager by entering:
|
||||
|
||||
cat /var/dt/Xpid
|
||||
|
||||
3. Kill the Login Manager by entering:
|
||||
|
||||
kill -TERM <process_id>
|
||||
|
||||
where <process_id> is the value obtained from Xpid.
|
||||
|
||||
|
||||
To Enable and Disable Desktop Auto-Start
|
||||
========================================
|
||||
|
||||
When your system is configured to start the desktop automatically, the
|
||||
desktop Login Manager runs when the system is booted.
|
||||
|
||||
To start the desktop automatically, you must edit /etc/inittab to:
|
||||
|
||||
* Add a line that starts the CDE Desktop.
|
||||
|
||||
* Set the default run level to the run level assigned to the CDE
|
||||
Desktop.
|
||||
|
||||
NOTE: Edit /etc/inittab very carefully.
|
||||
Errors in the file can prevent the system from booting
|
||||
successfully.
|
||||
|
||||
|
||||
To Enable Desktop Auto-Start
|
||||
----------------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. If you are running HP VUE, shut it down by entering:
|
||||
|
||||
/etc/telinit <n>; exit
|
||||
|
||||
where <n> is a run level assigned to the console and not
|
||||
assigned to HP VUE or to halting the system. You can find a
|
||||
run level by examinining the lines beginning with cons and vue
|
||||
in /etc/inittab. For example, the following lines indicate
|
||||
that you can use run levels other than 3, 4, or 6.
|
||||
|
||||
halt:6:wait:/usr/lib/X11/ignition/shutdown.ksh
|
||||
cons:012456:respawn:/etc/getty -h console console
|
||||
vue :34:respawn:/etc/vuerc
|
||||
|
||||
|
||||
3. Make a backup copy of /etc/inittab.
|
||||
|
||||
4. Open /etc/inittab for editing (in a diskless cluster, /etc/inittab
|
||||
is a context-dependent file).
|
||||
|
||||
5. Look for the line that sets the default run level (starting with
|
||||
init:). Set the default run level to 5.
|
||||
|
||||
init:5:initdefault:
|
||||
|
||||
|
||||
6. Add a line that starts the desktop at that run level:
|
||||
|
||||
dt :5:respawn:/usr/dt/bin/dtrc
|
||||
|
||||
|
||||
To Disable Desktop Auto-Start
|
||||
-----------------------------
|
||||
|
||||
You can restore a console by changing to a run level assigned to a
|
||||
console and not assigned to the desktop.
|
||||
|
||||
|
||||
Switching Between CDE and HP VUE
|
||||
--------------------------------
|
||||
You can switch back and forth between CDE and HP VUE by executing:
|
||||
|
||||
/etc/telinit <n>; exit
|
||||
|
||||
|
||||
where <n>=3 switches to HP VUE and <n>=5 switches to CDE.
|
||||
|
||||
|
||||
207
cde/admin/IntegTools/config/config.hp
Normal file
207
cde/admin/IntegTools/config/config.hp
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
####################################################
|
||||
### Configuration Instructions for HP-UX Systems ###
|
||||
####################################################
|
||||
|
||||
There are two ways to start the desktop:
|
||||
|
||||
|
||||
* You can manually start the desktop Login Manager. The advantage
|
||||
of using this method is that you will not have to edit
|
||||
/etc/inittab.
|
||||
|
||||
* You can enable the system to automatically start the desktop
|
||||
when the system is rebooted. This is done by editing
|
||||
/etc/inittab.
|
||||
|
||||
Removing the Developer's Conference CDE Desktop
|
||||
===============================================
|
||||
|
||||
It is imperative that Snapshot 1 and Snapshot 2 desktops do not
|
||||
co-mingle. Installers and users should ensure that old clients and
|
||||
configuration files are exited or removed.
|
||||
|
||||
|
||||
Upgrading systems in a networked environment
|
||||
--------------------------------------------
|
||||
|
||||
If CDE is installed in a network environment, it is imperative that
|
||||
all systems be upgraded at the same time.
|
||||
|
||||
|
||||
Removing the Snapshot 1 desktop
|
||||
-------------------------------
|
||||
|
||||
Installers are advised to remove the Snapshot 1 Desktop files from
|
||||
their systems. Those clients and files are obsolete.
|
||||
|
||||
|
||||
Stopping Desktop clients before installing Snapshot 2
|
||||
-----------------------------------------------------
|
||||
|
||||
If the Snapshot 1 desktop is not removed, ensure that all desktop
|
||||
clients are inactive before installing the Snapshot 2 desktop. If the
|
||||
desktop was started via /etc/inittab, issue the telinit command to
|
||||
stop dtlogin and any other desktop client.
|
||||
|
||||
|
||||
Removing the users's .dtprofile and .dt directory
|
||||
-------------------------------------------------
|
||||
|
||||
It is strongly advised that all CDE users on the system remove or
|
||||
rename their .dt directory and their .dtprofile. The Snapshot 2
|
||||
Desktop is not compatible with the Snapshot 1 Desktop versions of
|
||||
these files.
|
||||
|
||||
If users have customized their .dt/dtwmrc file and want to keep it,
|
||||
they will need to cut and paste the appropriate pieces into the new
|
||||
dtwmrc provided.
|
||||
|
||||
|
||||
|
||||
Before You Start the Desktop (HP-UX)
|
||||
======================================
|
||||
|
||||
Special Configurations
|
||||
----------------------
|
||||
|
||||
If your system has one of these special configurations, you may need to
|
||||
edit certain Login Manager files before starting the desktop. See
|
||||
chapter 2 of the Getting Started Guide:
|
||||
|
||||
|
||||
* If the system console is a non-bitmap device.
|
||||
|
||||
* If the system is an X terminal or a host for X terminals.
|
||||
|
||||
* If the system has more than one display.
|
||||
|
||||
|
||||
|
||||
The Subprocess Control Daemon
|
||||
=============================
|
||||
|
||||
If you are working in an environment where a CDE Desktop action needs
|
||||
to start an application on another workstation running CDE, the
|
||||
Subprocess Control Daemon configuration must be completed on both
|
||||
workstations.
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. For authentication, the user's home directory on a remote system
|
||||
must be mounted to the local system.
|
||||
|
||||
3. To run an application with a WINDOW_TYPE of NO_STDIO (see Appendix
|
||||
A, Advanced User's and System Administrator's Guide), you will need
|
||||
to provide NFS-access by the local (client) system to the remote
|
||||
(application server) system's /var directory (if /var is a distinct
|
||||
volume), or / directory (if it is not). The mount point must be
|
||||
/nfs/<remote_host>/var (again, if /var is a distinct volume) or
|
||||
/nfs/<remote_host>/ (if it is not). Export the appropriate
|
||||
directory in /etc/exports on both the local and remote hosts.
|
||||
|
||||
|
||||
To Start And Stop the Desktop Manually
|
||||
======================================
|
||||
|
||||
To Start the Desktop:
|
||||
--------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. Enter:
|
||||
|
||||
/usr/dt/bin/dtlogin -daemon
|
||||
|
||||
This starts the Login Manager and displays the Login screen.
|
||||
Logging in starts a desktop session.
|
||||
|
||||
To Stop the Desktop:
|
||||
--------------------
|
||||
|
||||
When you stop the Login Manager, you automatically kill all
|
||||
X servers and desktop sessions that it started.
|
||||
|
||||
1. In a terminal emulator window, log in as root.
|
||||
|
||||
2. Obtain the process id of the parent Login Manager by entering:
|
||||
|
||||
cat /var/dt/Xpid
|
||||
|
||||
3. Kill the Login Manager by entering:
|
||||
|
||||
kill -TERM <process_id>
|
||||
|
||||
where <process_id> is the value obtained from Xpid.
|
||||
|
||||
|
||||
To Enable and Disable Desktop Auto-Start
|
||||
========================================
|
||||
|
||||
When your system is configured to start the desktop automatically, the
|
||||
desktop Login Manager runs when the system is booted.
|
||||
|
||||
To start the desktop automatically, you must edit /etc/inittab to:
|
||||
|
||||
* Add a line that starts the CDE Desktop.
|
||||
|
||||
* Set the default run level to the run level assigned to the CDE
|
||||
Desktop.
|
||||
|
||||
NOTE: Edit /etc/inittab very carefully.
|
||||
Errors in the file can prevent the system from booting
|
||||
successfully.
|
||||
|
||||
|
||||
To Enable Desktop Auto-Start
|
||||
----------------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. If you are running HP VUE, shut it down by entering:
|
||||
|
||||
/etc/telinit <n>; exit
|
||||
|
||||
where <n> is a run level assigned to the console and not
|
||||
assigned to HP VUE or to halting the system. You can find a
|
||||
run level by examinining the lines beginning with cons and vue
|
||||
in /etc/inittab. For example, the following lines indicate
|
||||
that you can use run levels other than 3, 4, or 6.
|
||||
|
||||
halt:6:wait:/usr/lib/X11/ignition/shutdown.ksh
|
||||
cons:012456:respawn:/etc/getty -h console console
|
||||
vue :34:respawn:/etc/vuerc
|
||||
|
||||
|
||||
3. Make a backup copy of /etc/inittab.
|
||||
|
||||
4. Open /etc/inittab for editing (in a diskless cluster, /etc/inittab
|
||||
is a context-dependent file).
|
||||
|
||||
5. Look for the line that sets the default run level (starting with
|
||||
init:). Set the default run level to 5.
|
||||
|
||||
init:5:initdefault:
|
||||
|
||||
|
||||
6. Add a line that starts the desktop at that run level:
|
||||
|
||||
dt :5:respawn:/usr/dt/bin/dtrc
|
||||
|
||||
|
||||
To Disable Desktop Auto-Start
|
||||
-----------------------------
|
||||
|
||||
You can restore a console by changing to a run level assigned to a
|
||||
console and not assigned to the desktop.
|
||||
|
||||
|
||||
Switching Between CDE and HP VUE
|
||||
--------------------------------
|
||||
You can switch back and forth between CDE and HP VUE by executing:
|
||||
|
||||
/etc/telinit <n>; exit
|
||||
|
||||
|
||||
where <n>=3 switches to HP VUE and <n>=5 switches to CDE.
|
||||
|
||||
|
||||
285
cde/admin/IntegTools/config/config.ibm
Normal file
285
cde/admin/IntegTools/config/config.ibm
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
|
||||
=================================
|
||||
Instructions for IBM AIX Systems 04/11/94
|
||||
=================================
|
||||
|
||||
The following instructions assume you have already installed the Common Desktop
|
||||
Environment according to the Installation Instructions on the CD jacket. If
|
||||
CDE is used in a networked environment, all systems should be upgraded at the
|
||||
same time.
|
||||
|
||||
There are two ways to start the desktop:
|
||||
|
||||
* You can manually start the desktop Login Manager. This method can be used to
|
||||
avoid rebooting the system. See the section To Start and Stop the Desktop
|
||||
Manually .
|
||||
|
||||
* You can configure the system to start the desktop automatically upon reboot.
|
||||
See the section To Enable and Disable Desktop Auto-Start..
|
||||
|
||||
Before You Start the Desktop
|
||||
============================
|
||||
******************************************************************************
|
||||
If you have a previous Common Desktop Environment (CDE) version on the system:
|
||||
******************************************************************************
|
||||
|
||||
Advise all CDE users on the system to remove or rename their $HOME/.dt directory
|
||||
and their $HOME/.dtprofile. The new files are not compatible with the old
|
||||
ones. If users have customized the $HOME/.dt/dtwmrc file and want to keep
|
||||
it, they will need to cut and paste the appropriate pieces into the new dtwmrc
|
||||
file provided.
|
||||
|
||||
Become the root user on the system. Make sure all other users on the system
|
||||
are logged out of CDE. Kill the Login Manager.
|
||||
|
||||
cat /etc/opt/dt/Xpid (obtain Login Manager process_id)
|
||||
|
||||
kill -TERM <process_id>
|
||||
|
||||
Killing the Login Manager process works no matter how the process was started.
|
||||
An alternate method is to stop the system resource control for the desktop.
|
||||
This method should only be used if CDE was configured on the system with
|
||||
/opt/dt/bin/dtconfig -e. If you don't know how CDE was configured on the
|
||||
system, lssrc -s dtsrc will return the status of dtsrc. If no status
|
||||
is returned, use the kill method in the previous paragraph.
|
||||
|
||||
stopsrc -c -s dtsrc
|
||||
|
||||
Completely remove the /etc/opt and /opt directory structures from the system.
|
||||
The install script mentioned in the README should have already given you the
|
||||
chance to remove these. Remove the dtsrc subsystem only if CDE was configured
|
||||
on the system with /opt/dt/bin/dtconfig -e:
|
||||
|
||||
rmssys -s dtsrc
|
||||
|
||||
Default Configuration
|
||||
|
||||
The Instructions for IBM AIX Systems show basic installation information.
|
||||
We recommend following these instructions before doing any personal
|
||||
customization work except in the case of the Special Configurations.
|
||||
|
||||
Special Configurations
|
||||
|
||||
If your system has one of these special configurations, you may need to edit
|
||||
certain Login Manager files before starting the desktop. More detailed
|
||||
information is in the CDE Getting Started Guide.
|
||||
|
||||
* If the system console is a non-bitmap device (e.g. an ascii
|
||||
terminal)i, comment out the following line in /usr/dt/config/Xservers that
|
||||
starts the Xserver on the console.
|
||||
|
||||
# :0 Local local@console /path/X [options] :0
|
||||
|
||||
* If the system is an X terminal or a host for X terminals,
|
||||
CDE must be running on the host and X Display Manager Control Protocol
|
||||
(XDMCP) must be enabled for the X terminal and must direct the Xterminal to
|
||||
contact the Login Manager on a specified host.
|
||||
|
||||
* If the system has more than one display, see Configuring
|
||||
Multiple Displays in the CDE Getting Started Guide.
|
||||
|
||||
To Start and Stop the Desktop Manually
|
||||
--------------------------------------
|
||||
There are two manual methods to start the desktop:
|
||||
|
||||
* You can manually start the CDE Login Manager. To use this method, you must
|
||||
have permission to log in as root. This method is preferable, because Login
|
||||
Manager sets certain environment variables that are needed during desktop
|
||||
sessions. See the section Manually Starting and Stopping Login Manager.
|
||||
|
||||
* You can log in using conventional methods, and then manually run the
|
||||
CDE Session Manager, which starts a desktop session. See the section
|
||||
Manually Starting and Stopping Session Manager.
|
||||
|
||||
Manually Starting and Stopping Login Manager
|
||||
--------------------------------------------
|
||||
To manually start Login Manager:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. Enter:
|
||||
|
||||
/usr/dt/bin/dtlogin -daemon
|
||||
|
||||
This starts the Login Manager and displays the Login screen.
|
||||
Logging in starts a desktop session.
|
||||
|
||||
To manually stop Login Manager:
|
||||
|
||||
When you stop the Login Manager, you automatically kill all X servers and
|
||||
desktop sessions that it started.
|
||||
|
||||
1. In a terminal emulator window, log in as root.
|
||||
|
||||
2. Obtain the process id of the Login Manager by entering:
|
||||
|
||||
cat /var/dt/Xpid
|
||||
|
||||
3. Kill the Login Manager by entering:
|
||||
|
||||
kill -TERM <process_id>
|
||||
|
||||
where <process_id> is the value obtained from Xpid.
|
||||
|
||||
Manually Starting and Stopping Session Manager
|
||||
----------------------------------------------
|
||||
Using this method
|
||||
|
||||
* leaves you responsible for setting certain environment variables to values
|
||||
required by the desktop if suitable values are not already set in your
|
||||
environment.
|
||||
|
||||
|
||||
* allows you to use CDE while others serving from the same system, including
|
||||
the console are not.
|
||||
|
||||
1. Log in. (You do not need to log in as root).
|
||||
|
||||
2. With no window system running, from the command line enter:
|
||||
|
||||
/usr/bin/X11/xinit /usr/dt/bin/Xsession
|
||||
|
||||
HINT: if a .Xinitrc file is enabled, make sure it is NOT starting another
|
||||
window manager. Do NOT put the /usr/dt/bin/Xsession in your .profile!
|
||||
|
||||
Session Manager stops when you log out.
|
||||
|
||||
To Enable and Disable Desktop Auto-Start
|
||||
----------------------------------------
|
||||
AIX can be configured to start the CDE Desktop automatically when the system
|
||||
is booted. This method starts CDE as the Session Manager for all users on
|
||||
the system.
|
||||
|
||||
There are several ways to do this configuration:
|
||||
|
||||
* From a command line.
|
||||
|
||||
* Using SMIT menus.
|
||||
|
||||
* Using SMIT fastpath.
|
||||
|
||||
From a Command Line
|
||||
-------------------
|
||||
To Enable Desktop Auto-Start:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
/usr/dt/bin/dtconfig -e
|
||||
|
||||
3. Reboot the machine.
|
||||
|
||||
When the system is rebooted, a dtlogin screen will appear. If you prefer not
|
||||
to reboot at this time, this command will start the Login Manager now.
|
||||
|
||||
startsrc -s dtsrc
|
||||
|
||||
To Disable Desktop Auto-Start:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
/usr/dt/bin/dtconfig -d
|
||||
|
||||
3. Reboot the machine.
|
||||
|
||||
When the system is rebooted, CDE is no longer configured. If you prefer not
|
||||
to reboot at this time, this command will stop the Login Manager now.
|
||||
|
||||
stopsrc -c -s dtsrc
|
||||
|
||||
Using SMIT Menus
|
||||
----------------
|
||||
To Enable Desktop Auto-Start:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
/usr/bin/smit
|
||||
|
||||
3. Go to System Environments.
|
||||
|
||||
4. Go to Change System User Interface.
|
||||
|
||||
5. Select CDE environment.
|
||||
|
||||
6. Press [Enter] when using ASCII SMIT or Click "Do" when using GUI
|
||||
SMIT interface.
|
||||
|
||||
7. Exit SMIT.
|
||||
|
||||
8. Reboot the machine.
|
||||
|
||||
To Disable Desktop Auto-Start:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter
|
||||
|
||||
/usr/bin/smit
|
||||
|
||||
3. Go to System Environments.
|
||||
|
||||
4. Go to Change System User Interface.
|
||||
|
||||
5. Select Command-line environment.
|
||||
|
||||
6. Press [Enter] when using ASCII SMIT or Click "Do" when
|
||||
using GUI SMIT interface.
|
||||
|
||||
7. Exit out of SMIT.
|
||||
|
||||
8. Reboot the machine.
|
||||
|
||||
Using SMIT `fastpath'
|
||||
---------------------
|
||||
To Enable Desktop Auto-Start:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
/usr/bin/smit dtconfig
|
||||
|
||||
3. Select CDE environment.
|
||||
|
||||
4. Press [Enter] when using ASCII SMIT or Click "Do" when using GUI
|
||||
SMIT interface.
|
||||
|
||||
5. Exit SMIT.
|
||||
|
||||
6. Reboot the machine.
|
||||
|
||||
To Disable Desktop Auto-Start:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
/usr/bin/smit dtconfig
|
||||
|
||||
3. Select Command-line environment.
|
||||
|
||||
4. Press [Enter] when using ASCII SMIT or Click "Do" when using GUI
|
||||
SMIT interface.
|
||||
|
||||
5. Exit out of SMIT.
|
||||
|
||||
6. Reboot the machine.
|
||||
|
||||
Deinstall Instructions
|
||||
======================
|
||||
The CD also includes a script for deinstallation. With the CD-ROM mounted
|
||||
according to the Installation Instructions on the CD jacket, enter:
|
||||
|
||||
./dinstall.dt
|
||||
|
||||
or
|
||||
|
||||
./DINSTALL.DT
|
||||
|
||||
Everything installed from the installation scripts will be deinstalled.
|
||||
|
||||
79
cde/admin/IntegTools/config/config.sco
Normal file
79
cde/admin/IntegTools/config/config.sco
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
####################################
|
||||
### Instructions for SCO Systems ###
|
||||
####################################
|
||||
|
||||
System Requirements
|
||||
===================
|
||||
|
||||
* SCO Open Desktop or SCO Open Server Version 3.0
|
||||
* 386-33, 486, or Pentium based processor
|
||||
* 16MB memory
|
||||
* 1024x768, 256 color graphics system
|
||||
* 70MB free disk space
|
||||
* 30MB Swap Space
|
||||
|
||||
|
||||
Before You Start the Desktop
|
||||
============================
|
||||
|
||||
If your system has one of these special configurations, you may need to
|
||||
edit certain Login Manager files before starting the desktop. See
|
||||
chapter 2 of the Getting Started Guide:
|
||||
|
||||
|
||||
* If the system console is a non-bitmap device.
|
||||
|
||||
* If the system is an X terminal or a host for X terminals.
|
||||
|
||||
* If the system has more than one display.
|
||||
|
||||
|
||||
|
||||
|
||||
To Start and Stop the Desktop
|
||||
============================
|
||||
|
||||
1. Log in as the user who will use the desktop and be running the Korn or
|
||||
Bourne shells (ksh or sh).
|
||||
|
||||
2. First, add the following two lines to your .profile:
|
||||
|
||||
PATH=$PATH:/opt/dt/bin
|
||||
. /opt/dt/bin/dtsearchpath
|
||||
|
||||
These lines add the desktop search path to your PATH variable.
|
||||
|
||||
3. If you have a .startxrc file in your home directory, move it to a
|
||||
backup location or name by entering:
|
||||
|
||||
mv .startxrc old.startxrc
|
||||
|
||||
4. Copy /etc/opt/dt/dt.startxrc to your home directory and rename it
|
||||
to .startxrc by entering:
|
||||
|
||||
cp /etc/opt/dt/dt.startxrc .startxrc
|
||||
|
||||
5. Do one of the following:
|
||||
|
||||
* Log out of your ODT session and log in via Scologin.
|
||||
|
||||
* Or, at a shell prompt on a multiscreen not running the X
|
||||
server, run startx by entering:
|
||||
|
||||
startx
|
||||
|
||||
Be sure to log out to reinvoke your .profile correctly.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
207
cde/admin/IntegTools/config/config.sun
Normal file
207
cde/admin/IntegTools/config/config.sun
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
#################################################### 04/08/94
|
||||
### Instructions for the Sun Solaris Environment ###
|
||||
####################################################
|
||||
|
||||
|
||||
Removing the October '93 Developer's Conference CDE Desktop
|
||||
===========================================================
|
||||
|
||||
It is imperative that CDE Snapshot 1 and Snapshot 2 desktops do not
|
||||
co-mingle. Installers and users should ensure that old clients and
|
||||
configuration files are exited or removed. Use the instructions
|
||||
in this section if the October '93 Snapshot 1 version of CDE is
|
||||
installed on your system.
|
||||
|
||||
|
||||
Upgrading systems in a networked environment
|
||||
--------------------------------------------
|
||||
|
||||
If CDE is installed in a network environment, it is imperative that
|
||||
all systems be upgraded at the same time.
|
||||
|
||||
|
||||
Removing the Snapshot 1 desktop
|
||||
-------------------------------
|
||||
|
||||
Installers are advised to remove the Snapshot 1 Desktop files from
|
||||
their systems. Those clients and files are obsolete. The dinstall.dt
|
||||
script which was provided on the Snapshot 1 CD may be used for this
|
||||
purpose.
|
||||
|
||||
|
||||
Stopping Desktop clients before installing Snapshot 2
|
||||
-----------------------------------------------------
|
||||
|
||||
If the Snapshot 1 desktop is not removed, ensure that all desktop
|
||||
clients are inactive before installing the Snapshot 2 desktop.
|
||||
|
||||
|
||||
Removing the users's .dtprofile and .dt directory
|
||||
-------------------------------------------------
|
||||
|
||||
It is strongly advised that all CDE users on the system remove or
|
||||
rename their .dt directory and their .dtprofile. The Snapshot 2
|
||||
Desktop is not compatible with the Snapshot 1 Desktop versions of
|
||||
these files.
|
||||
|
||||
If users have customized their .dt/dtwmrc file and want to keep it,
|
||||
they will need to cut and paste the appropriate pieces into the new
|
||||
dtwmrc provided.
|
||||
|
||||
|
||||
Before You Start the Desktop
|
||||
============================
|
||||
|
||||
You can start the CDE Desktop by:
|
||||
|
||||
* Configuring the system to auto-start the CDE Desktop when
|
||||
the system is booted.
|
||||
|
||||
* Or, manually starting the desktop Login Manager.
|
||||
|
||||
|
||||
Special Configurations
|
||||
----------------------
|
||||
|
||||
If your system has one of these special configurations, you may need to
|
||||
edit certain Login Manager files before starting the desktop. See the
|
||||
Advanced User's and System Administrator's Guide:
|
||||
|
||||
* If the system console is a non-bitmap device.
|
||||
|
||||
* If the system is an X terminal or a host for X terminals.
|
||||
|
||||
* If the system has more than one display.
|
||||
|
||||
|
||||
To Enable and Disable Desktop Auto-Start
|
||||
========================================
|
||||
|
||||
When auto-start is enabled, the CDE Login Manager runs automatically
|
||||
each time the system is booted. You then log in using the
|
||||
CDE Login Screen.
|
||||
|
||||
To Enable Desktop Auto-Start
|
||||
----------------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
/usr/dt/bin/dtconfig -e
|
||||
|
||||
A CDE Login screen will appear the next time the system is booted.
|
||||
|
||||
|
||||
To Disable Desktop Auto-Start
|
||||
-----------------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From a command line, enter:
|
||||
|
||||
/usr/dt/bin/dtconfig -d
|
||||
|
||||
A conventional ascii login will appear the next time the system
|
||||
is booted.
|
||||
|
||||
|
||||
To Start and Stop the Desktop Manually
|
||||
======================================
|
||||
|
||||
There are two ways to start the desktop manually:
|
||||
|
||||
* You can manually start the CDE Login Manager, which will display the
|
||||
desktop Login screen. To use this method, you must have permission
|
||||
to log in as root.
|
||||
|
||||
This method is the preferable manual method, since Login Manager sets
|
||||
certain environment variables that are needed during desktop sessions.
|
||||
|
||||
* You can log in using conventional methods, and then manually run the CDE
|
||||
Session Manager, which starts a desktop session.
|
||||
|
||||
|
||||
Manually Starting and Stopping Login Manager
|
||||
--------------------------------------------
|
||||
|
||||
When you use this method, you log in using the desktop Login screen.
|
||||
When you log in, a desktop session starts.
|
||||
|
||||
To manually start Login Manager:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. With no window system running, from the command line enter:
|
||||
|
||||
/usr/dt/bin/dtlogin
|
||||
|
||||
|
||||
To manually stop Login Manager:
|
||||
|
||||
1. If you are in a desktop session, exit (via front panel button).
|
||||
|
||||
2. On the Login screen, choose Options->Command Line
|
||||
to return to a command line.
|
||||
|
||||
3. On the command line, enter [Ctrl]c (hold down [Ctrl] as
|
||||
you press [c]).
|
||||
|
||||
You are now back to your root login with a command line prompt.
|
||||
|
||||
|
||||
Manually Starting and Stopping Session Manager
|
||||
----------------------------------------------
|
||||
|
||||
If you use this method, you are responsible for setting certain environment
|
||||
variables to values required by the desktop if suitable values are
|
||||
not already set in your environment. See the Advanced User's and System
|
||||
Administrator's Guide.
|
||||
|
||||
1. Log in. (You do not need to log in as root).
|
||||
|
||||
If you set LD_LIBRARY_PATH (its not required for CDE), make sure the
|
||||
/usr/dt/lib directory is at head of list. In addition, you should
|
||||
set the environment variable OPENWINHOME to /usr/openwin.
|
||||
|
||||
2. With no window system running, from the command line enter:
|
||||
|
||||
/usr/openwin/bin/xinit /usr/dt/bin/Xsession
|
||||
|
||||
This starts your CDE desktop session. Exit button is on front panel.
|
||||
|
||||
|
||||
|
||||
To Configure Subprocess Control Daemon remote access
|
||||
====================================================
|
||||
|
||||
If you are working in an environment where a CDE Desktop action needs to
|
||||
start an application on another workstation running CDE, the Subprocess
|
||||
Control Daemon must have access to the /tmp directory of the remote
|
||||
workstation.
|
||||
|
||||
The following procedure will provide this.
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. Provide NFS-access by the local (client) system to the remote (application
|
||||
server) system's /tmp directory. The mount point must be
|
||||
/nfs/<remote_host>/tmp.
|
||||
|
||||
On systems running automount, the following procedure provides this mount:
|
||||
|
||||
a. Enter:
|
||||
|
||||
mkdir /nfs
|
||||
|
||||
b. Add the following lines to /etc/auto_master:
|
||||
|
||||
/nfs -hosts -nosuid
|
||||
|
||||
c. To allow export of the /tmp directory, add the following line
|
||||
to /etc/dfs/dfstab:
|
||||
|
||||
shared -F nfs -o rw /tmp
|
||||
|
||||
3. The subprocess control daemon will have correct access the next time
|
||||
the workstation is booted.
|
||||
207
cde/admin/IntegTools/config/config.usl
Normal file
207
cde/admin/IntegTools/config/config.usl
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
#########################################################################
|
||||
# Configuration Instructions for the UnixWare 1.1 or later Environments #
|
||||
#########################################################################
|
||||
|
||||
The following instructions assume you have already installed the Common Desktop
|
||||
Environment according to the Installation Instructions on the CD jacket.
|
||||
|
||||
There are two ways to start the desktop:
|
||||
|
||||
* You can manually start the desktop Login Manager. This method can be used to
|
||||
avoid rebooting the system. See the section To Start and Stop the Desktop
|
||||
Manually .
|
||||
|
||||
* You can configure the system to start the desktop automatically upon reboot.
|
||||
See the section To Enable and Disable Desktop Auto-Start..
|
||||
|
||||
|
||||
|
||||
Before You Start the Desktop
|
||||
============================
|
||||
******************************************************************************
|
||||
If you have a previous Common Desktop Environment (CDE) version on the system:
|
||||
******************************************************************************
|
||||
|
||||
*Advise all CDE users on the system to remove or rename their $HOME/.dt directory
|
||||
and their $HOME/.dtprofile. The new files are not compatible with the old
|
||||
ones. If users have customized the $HOME/.dt/dtwmrc file and want to keep
|
||||
it, they will need to cut and paste the appropriate pieces into the new dtwmrc
|
||||
file provided.
|
||||
|
||||
*Become the root user on the system. Make sure all other users on the system
|
||||
are logged out of CDE. Kill the Login Manager if running.
|
||||
|
||||
kill -15 `cat /etc/opt/dt/Xpid`
|
||||
|
||||
Killing the Login Manager process works no matter how the process was started.
|
||||
An alternate method is to stop the system resource control for the desktop.
|
||||
This method should only be used if CDE was configured on the system by
|
||||
replacing the /etc/rc2.d/S69xdm script. You can tell if CDE was configured
|
||||
this way by checking the existence of /etc/S69xdm.old. If this file
|
||||
exists, then do the following:
|
||||
|
||||
mv /etc/S69xdm.old /etc/rc2.d/S69xdm
|
||||
|
||||
|
||||
|
||||
Special Configurations
|
||||
----------------------
|
||||
|
||||
If your system has one of these special configurations, you may need to
|
||||
edit certain Login Manager files before starting the desktop. See the
|
||||
Advanced User's and System Administrator's Guide:
|
||||
|
||||
* If the system console is not a UnixWare supported bitmap device.
|
||||
|
||||
* If the system is an X terminal or a host for X terminals.
|
||||
|
||||
* If the system has more than one display.
|
||||
|
||||
|
||||
To Start and Stop the Desktop Manually
|
||||
======================================
|
||||
|
||||
There are two ways to start the desktop manually:
|
||||
|
||||
|
||||
* You can manually start the CDE Login Manager, which will
|
||||
display the desktop Login screen. To use this method, you
|
||||
must have permission to log in as root.
|
||||
|
||||
This method is preferable, since Login Manager sets certain
|
||||
environment variables that are needed during desktop sessions.
|
||||
|
||||
* You can log in using conventional methods, and then manually
|
||||
run the CDE Session Manager, which starts a desktop session.
|
||||
See the section Manually Starting and Stopping the Session
|
||||
Manager.
|
||||
|
||||
Manually Starting and Stopping Login Manager
|
||||
--------------------------------------------
|
||||
|
||||
When you use this method, you log in using the CDE Login screen.
|
||||
When you log in, a desktop session starts.
|
||||
|
||||
To manually start Login Manager:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. Type:
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/dt/lib:/usr/X/lib export LD_LIBRARY_PATH
|
||||
|
||||
3. With no window system running, from the command line enter:
|
||||
|
||||
/usr/dt/bin/dtlogin -daemon
|
||||
|
||||
The CDE Graphical Login screen will appear.
|
||||
|
||||
4. For security reasons, you need to exit the shell that invoked dtlogin.
|
||||
Type <Alt><SysRq> p
|
||||
(i.e. Press the <Alt> and <SysRq> keys at the same time,
|
||||
release both and then hit 'p'. )
|
||||
|
||||
You should return to an ASCII terminal session.
|
||||
|
||||
5. Type:
|
||||
<return>
|
||||
exit
|
||||
|
||||
6. You will be asked if you want your virtual terminals closed at once.
|
||||
Type: n
|
||||
|
||||
The CDE Graphical Login screen will reappear.
|
||||
|
||||
|
||||
To manually stop Login Manager:
|
||||
|
||||
1. Log out of the CDE Desktop.
|
||||
|
||||
2. From the options menu of the CDE Graphical Login choose Command Line.
|
||||
|
||||
This will give you the ASCII login screen.
|
||||
|
||||
3. Log in as root.
|
||||
|
||||
4. Type:
|
||||
kill -15 `cat /usr/dt/config/Xpid`
|
||||
|
||||
|
||||
|
||||
Manually Starting and Stopping Session Manager
|
||||
----------------------------------------------
|
||||
|
||||
If you use this method, you are responsible for setting certain
|
||||
environment variables to values required by the desktop if suitable
|
||||
values are not already set in your environment. Refer to the Getting
|
||||
Started Guide for setting the necessary environment variables.
|
||||
|
||||
|
||||
1. Log in. (You do not need to log in as root).
|
||||
|
||||
2. With no window system running, from the command line enter:
|
||||
|
||||
LD_LIBRARY_PATH=/usr/dt/lib:/usr/X/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
PATH=$PATH:/usr/X/bin
|
||||
export PATH
|
||||
|
||||
/usr/X/bin/olinit /usr/dt/bin/Xsession
|
||||
|
||||
The Session Manager stops when you log out.
|
||||
When auto-start is enabled, the CDE Login Manager runs
|
||||
automatically each time the system is booted. You then log
|
||||
in using the CDE Login Screen.
|
||||
|
||||
|
||||
To Enable and Disable Desktop Auto-Start
|
||||
========================================
|
||||
UnixWare can be configured to start the CDE Desktop automatically when the system
|
||||
is booted. This method starts CDE as the Session Manager for all users on
|
||||
the system.
|
||||
|
||||
|
||||
To Enable Desktop Auto-Start
|
||||
----------------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
NOTE: Step 'a' is necessay only if the /etc/rc2.d/S69xdm
|
||||
script has been modified after UnixWare was
|
||||
installed on your system and if the graphical login
|
||||
is enabled. A copy of the S69xdm script that
|
||||
came with the UnixWare installation is located
|
||||
in /usr/X/adm.
|
||||
|
||||
a. cp /etc/rc2.d/S69xdm /etc/S69xdm.preCDE
|
||||
b. cp /usr/dt/config/S69xdm /etc/rc2.d/S69xdm
|
||||
|
||||
A CDE Login screen will appear the next time the system is booted.
|
||||
|
||||
|
||||
To Disable Desktop Auto-Start
|
||||
-----------------------------
|
||||
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From a command line, enter:
|
||||
|
||||
rm /etc/rc2.d/S69xdm
|
||||
|
||||
If you would like the original UnixWare Desktop Manager Login
|
||||
to appear upon reboot:
|
||||
|
||||
/usr/X/bin/enable_glogin
|
||||
|
||||
- OR -
|
||||
|
||||
If a copy of S69xdm was saved as outlined in the section
|
||||
"To Enable Desktop Auto-Start":
|
||||
|
||||
mv /etc/S69xdm.preCDE /etc/rc2.d/S69xdm
|
||||
|
||||
The UnixWare Desktop Manager Login will appear
|
||||
the next time the system is rebooted.
|
||||
207
cde/admin/IntegTools/config/config.uxp
Normal file
207
cde/admin/IntegTools/config/config.uxp
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
#########################################################################
|
||||
# Configuration Instructions for the Fujitsu UXP/DS Environments #
|
||||
#########################################################################
|
||||
|
||||
The following instructions assume you have already installed the Common Desktop
|
||||
Environment according to the Installation Instructions on the CD jacket.
|
||||
|
||||
There are two ways to start the desktop:
|
||||
|
||||
* You can manually start the desktop Login Manager. This method can be used to
|
||||
avoid rebooting the system. See the section To Start and Stop the Desktop
|
||||
Manually .
|
||||
|
||||
* You can configure the system to start the desktop automatically upon reboot.
|
||||
See the section To Enable and Disable Desktop Auto-Start..
|
||||
|
||||
|
||||
|
||||
Before You Start the Desktop
|
||||
============================
|
||||
******************************************************************************
|
||||
If you have a previous Common Desktop Environment (CDE) version on the system:
|
||||
******************************************************************************
|
||||
|
||||
*Advise all CDE users on the system to remove or rename their $HOME/.dt directory
|
||||
and their $HOME/.dtprofile. The new files are not compatible with the old
|
||||
ones. If users have customized the $HOME/.dt/dtwmrc file and want to keep
|
||||
it, they will need to cut and paste the appropriate pieces into the new dtwmrc
|
||||
file provided.
|
||||
|
||||
*Become the root user on the system. Make sure all other users on the system
|
||||
are logged out of CDE. Kill the Login Manager if running.
|
||||
|
||||
kill -15 `cat /etc/opt/dt/Xpid`
|
||||
|
||||
Killing the Login Manager process works no matter how the process was started.
|
||||
An alternate method is to stop the system resource control for the desktop.
|
||||
This method should only be used if CDE was configured on the system by
|
||||
replacing the /etc/rc2.d/S69xdm script. You can tell if CDE was configured
|
||||
this way by checking the existence of /etc/S69xdm.old. If this file
|
||||
exists, then do the following:
|
||||
|
||||
mv /etc/S69xdm.old /etc/rc2.d/S69xdm
|
||||
|
||||
|
||||
|
||||
Special Configurations
|
||||
----------------------
|
||||
|
||||
If your system has one of these special configurations, you may need to
|
||||
edit certain Login Manager files before starting the desktop. See the
|
||||
Advanced User's and System Administrator's Guide:
|
||||
|
||||
* If the system console is not a UnixWare supported bitmap device.
|
||||
|
||||
* If the system is an X terminal or a host for X terminals.
|
||||
|
||||
* If the system has more than one display.
|
||||
|
||||
|
||||
To Start and Stop the Desktop Manually
|
||||
======================================
|
||||
|
||||
There are two ways to start the desktop manually:
|
||||
|
||||
|
||||
* You can manually start the CDE Login Manager, which will
|
||||
display the desktop Login screen. To use this method, you
|
||||
must have permission to log in as root.
|
||||
|
||||
This method is preferable, since Login Manager sets certain
|
||||
environment variables that are needed during desktop sessions.
|
||||
|
||||
* You can log in using conventional methods, and then manually
|
||||
run the CDE Session Manager, which starts a desktop session.
|
||||
See the section Manually Starting and Stopping the Session
|
||||
Manager.
|
||||
|
||||
Manually Starting and Stopping Login Manager
|
||||
--------------------------------------------
|
||||
|
||||
When you use this method, you log in using the CDE Login screen.
|
||||
When you log in, a desktop session starts.
|
||||
|
||||
To manually start Login Manager:
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. Type:
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/dt/lib:/usr/X/lib export LD_LIBRARY_PATH
|
||||
|
||||
3. With no window system running, from the command line enter:
|
||||
|
||||
/usr/dt/bin/dtlogin -daemon
|
||||
|
||||
The CDE Graphical Login screen will appear.
|
||||
|
||||
4. For security reasons, you need to exit the shell that invoked dtlogin.
|
||||
Type <Alt><SysRq> p
|
||||
(i.e. Press the <Alt> and <SysRq> keys at the same time,
|
||||
release both and then hit 'p'. )
|
||||
|
||||
You should return to an ASCII terminal session.
|
||||
|
||||
5. Type:
|
||||
<return>
|
||||
exit
|
||||
|
||||
6. You will be asked if you want your virtual terminals closed at once.
|
||||
Type: n
|
||||
|
||||
The CDE Graphical Login screen will reappear.
|
||||
|
||||
|
||||
To manually stop Login Manager:
|
||||
|
||||
1. Log out of the CDE Desktop.
|
||||
|
||||
2. From the options menu of the CDE Graphical Login choose Command Line.
|
||||
|
||||
This will give you the ASCII login screen.
|
||||
|
||||
3. Log in as root.
|
||||
|
||||
4. Type:
|
||||
kill -15 `cat /usr/dt/config/Xpid`
|
||||
|
||||
|
||||
|
||||
Manually Starting and Stopping Session Manager
|
||||
----------------------------------------------
|
||||
|
||||
If you use this method, you are responsible for setting certain
|
||||
environment variables to values required by the desktop if suitable
|
||||
values are not already set in your environment. Refer to the Getting
|
||||
Started Guide for setting the necessary environment variables.
|
||||
|
||||
|
||||
1. Log in. (You do not need to log in as root).
|
||||
|
||||
2. With no window system running, from the command line enter:
|
||||
|
||||
LD_LIBRARY_PATH=/usr/dt/lib:/usr/X/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
PATH=$PATH:/usr/X/bin
|
||||
export PATH
|
||||
|
||||
/usr/X/bin/olinit /usr/dt/bin/Xsession
|
||||
|
||||
The Session Manager stops when you log out.
|
||||
When auto-start is enabled, the CDE Login Manager runs
|
||||
automatically each time the system is booted. You then log
|
||||
in using the CDE Login Screen.
|
||||
|
||||
|
||||
To Enable and Disable Desktop Auto-Start
|
||||
========================================
|
||||
UnixWare can be configured to start the CDE Desktop automatically when the system
|
||||
is booted. This method starts CDE as the Session Manager for all users on
|
||||
the system.
|
||||
|
||||
|
||||
To Enable Desktop Auto-Start
|
||||
----------------------------
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From the command line, enter:
|
||||
|
||||
NOTE: Step 'a' is necessay only if the /etc/rc2.d/S69xdm
|
||||
script has been modified after UnixWare was
|
||||
installed on your system and if the graphical login
|
||||
is enabled. A copy of the S69xdm script that
|
||||
came with the UnixWare installation is located
|
||||
in /usr/X/adm.
|
||||
|
||||
a. cp /etc/rc2.d/S69xdm /etc/S69xdm.preCDE
|
||||
b. cp /usr/dt/config/S69xdm /etc/rc2.d/S69xdm
|
||||
|
||||
A CDE Login screen will appear the next time the system is booted.
|
||||
|
||||
|
||||
To Disable Desktop Auto-Start
|
||||
-----------------------------
|
||||
|
||||
|
||||
1. Log in as root.
|
||||
|
||||
2. From a command line, enter:
|
||||
|
||||
rm /etc/rc2.d/S69xdm
|
||||
|
||||
If you would like the original UnixWare Desktop Manager Login
|
||||
to appear upon reboot:
|
||||
|
||||
/usr/X/bin/enable_glogin
|
||||
|
||||
- OR -
|
||||
|
||||
If a copy of S69xdm was saved as outlined in the section
|
||||
"To Enable Desktop Auto-Start":
|
||||
|
||||
mv /etc/S69xdm.preCDE /etc/rc2.d/S69xdm
|
||||
|
||||
The UnixWare Desktop Manager Login will appear
|
||||
the next time the system is rebooted.
|
||||
11
cde/admin/IntegTools/dbTools/Imakefile
Normal file
11
cde/admin/IntegTools/dbTools/Imakefile
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
XCOMM $XConsortium: Imakefile /main/5 1996/04/23 21:26:14 drk $
|
||||
|
||||
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
|
||||
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
|
||||
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
|
||||
-Usun -Uusl -Uuxp -Uaix -Udec -UAIX -Uibm -Uhp
|
||||
|
||||
AllTarget(installCDE dinstallCDE)
|
||||
|
||||
CppScriptTarget(installCDE,installCDE.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(dinstallCDE,dinstallCDE.src,$(LOCAL_CPP_DEFINES),)
|
||||
216
cde/admin/IntegTools/dbTools/UDB.format
Normal file
216
cde/admin/IntegTools/dbTools/UDB.format
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
|
||||
UDB FILE FORMAT
|
||||
|
||||
The udb (universal data base) format attempts to allow product delivery
|
||||
information for several closely related products to co-exist in the
|
||||
same database file. This is an HP Corvallis home-grown format which
|
||||
was originally created to deal with the delivery of similar products
|
||||
on hp-ux, domain and osf platforms.
|
||||
|
||||
The format is meant to be more or less free form without regard to
|
||||
intervening newlines or whitespace. Comments violate this principle
|
||||
by being line oriented. Any line whose first non-whitespace character
|
||||
is a '#' is considered a comment. A semi-colon may be placed between
|
||||
two identifiers to break them up into separate tokens. If more than
|
||||
one keyword/value pair is placed on a line, semi-colons can be used
|
||||
to separate them visually. The semi-colons are ignored by the parser.
|
||||
|
||||
The special syntax characters ( "{",":",";","=","}") may be embedded
|
||||
in an identifier by escaping them with a backslash.
|
||||
|
||||
Semantic Note:
|
||||
The tools associated with the udb databases apply semantic meaning
|
||||
to seven kinds of information about a file. There are seven Special
|
||||
Tokens which may be used to identify the keywords with which the
|
||||
semantic information should be associated.
|
||||
|
||||
Special Token description
|
||||
------------ -----------
|
||||
<SRC> The path (relative to the top of a
|
||||
build tree) to the source of a
|
||||
product deliverable file.
|
||||
|
||||
<DEST> The full destination path location of
|
||||
a deliverable file in the target
|
||||
machine's file system.
|
||||
|
||||
<LNK> The full path name (in the target
|
||||
machine's file system) of the source
|
||||
file for a symbolic link. (i.e. The file
|
||||
pointed to).
|
||||
|
||||
<TYPE> The kind of file object being installed.
|
||||
(i.e. file, sym_link, hard_link,
|
||||
directory, etc. )
|
||||
|
||||
<MODE> The (numeric) permissions assigned to
|
||||
the new object. This value should be
|
||||
in the usual octal notation.
|
||||
|
||||
<OWNER> The symbolic name of the owner of the
|
||||
new file.
|
||||
|
||||
<GROUP> The symbolic name of the group of the
|
||||
new file.
|
||||
|
||||
The hp-ux fileset databases have traditionally used the
|
||||
following keywords for these items:
|
||||
|
||||
hpux keyword Special Token
|
||||
------------ -----------
|
||||
a_out_location : <SRC>
|
||||
install_target : <DEST>
|
||||
link_source : <LNK>
|
||||
type : <TYPE>
|
||||
mode : <MODE>
|
||||
owner : <OWNER>
|
||||
group : <GROUP>
|
||||
|
||||
The default for the udb databases is to associate the <SRC> semantics
|
||||
with the "a_out_location" keyword, the <DEST> semantics with the
|
||||
"install_target" keyword, etc. This behavior may be modified by
|
||||
assigning a special token to a keyword in the Release Definition
|
||||
Section of the database file.
|
||||
|
||||
|
||||
General Format:
|
||||
A udb file has two sections. First, a Release Definition Section,
|
||||
which describes the keyword pairs to be maintained for a given
|
||||
release stream and second, the individual file records for each
|
||||
file which is to be delivered.
|
||||
|
||||
1) Release Definition Section
|
||||
|
||||
The Release Definition Section defines the keyword-value
|
||||
pairs which are to be maintained for each release. The
|
||||
release_id is an identifier which is used to identify the
|
||||
set of defaults for a particular release. The special
|
||||
release_id of "default" is used specify the default set
|
||||
of keyword/value pairs for an undefined release_id. The
|
||||
values associated with keywords in this section provide
|
||||
defaults for those keywords in later File Entries.
|
||||
|
||||
The name and number of these pairs need not be the same for
|
||||
all release streams.
|
||||
------------------------------
|
||||
For example:
|
||||
The following entry in the Release Definition Section
|
||||
|
||||
{ hpux : defaults
|
||||
src = <SRC>
|
||||
dest = <DEST>
|
||||
link_source =
|
||||
type = file
|
||||
perm = <MODE>
|
||||
perm = 0555
|
||||
owner = bin
|
||||
group = bin
|
||||
project = xwindows
|
||||
}
|
||||
|
||||
defines the defaults for the "hpux" release stream. It
|
||||
states that we should maintain information about src, dest, link_source, type, perm, owner, group and project in the database. Furthermore
|
||||
the semantics of <SRC> are to be associated with the keyword "src",
|
||||
<DEST> with "dest", link_source is associated with <LNK> by default,
|
||||
and type is associated with <TYPE> by default. Note that we associate
|
||||
perm with <MODE> semantics and supply a default value (0555) different
|
||||
from the automatic 0444 default. Owner and group have their usual
|
||||
meaning and a field called "project" is defined with a default value
|
||||
of "xwindows". No semantic information is known about the "project"
|
||||
field but it's value will be maintained.
|
||||
-------------------------
|
||||
|
||||
|
||||
2) File Entries
|
||||
After the Release Definition Section, come the entries for
|
||||
the deliverable files comprising the release. The build-tree-top
|
||||
relative path name of a source file is followed by one or more
|
||||
destination specifications which describe where in the product
|
||||
this file should go, as well as the ownerships/permissions etc. that
|
||||
should be associated with it. Any missing keyword/value pairs will
|
||||
be filled in by the defaults provided in the Release Definition
|
||||
Section.
|
||||
Information may differ between release
|
||||
streams. If there is no destination spec for a given release and
|
||||
there is no "default" destination spec then that souce file will
|
||||
not be delivered for that release. The "default" destination spec
|
||||
(if it exists) should come last and is applied for release streams
|
||||
that do not have more specific destination specs.
|
||||
|
||||
-------------------
|
||||
For example The following file entry:
|
||||
|
||||
cose/unity1/types/coe.vf
|
||||
{ hp-ux
|
||||
install_target = /usr/coe/newconfig/coe.vf
|
||||
}
|
||||
{ aix
|
||||
install_target = /usr/coe/types/coe.vf
|
||||
}
|
||||
{ default
|
||||
install_target = /var/coe/types/coe.vf
|
||||
owner = sys
|
||||
group = admin
|
||||
}
|
||||
|
||||
states that on hp-ux the file found at
|
||||
$(TOP)/cose/unity1/types/coe.vf in the build tree, is to be delivered
|
||||
to "/usr/coe/newconfig/coe.vf" on hp-ux; "/usr/coe/types/coe.vf" on
|
||||
aix; and "/var/coe/types/coe.vf" on all other release platforms. In
|
||||
addition, on all platforms other than hp-ux and aix the default
|
||||
owner and group (usually bin,bin) are replaced by sys,admin for this
|
||||
file.
|
||||
------------------
|
||||
|
||||
Pseudo-BNF:
|
||||
Here follows a pseudo-BNF description of the syntax of a
|
||||
udb file:
|
||||
---------------------------------------------------------------------
|
||||
|
||||
udbFile = release_definition_section file_records
|
||||
|
||||
release_definition_section = release_def release_definition_section |
|
||||
release_def
|
||||
|
||||
release_def = "{" release_id ":" "defaults" record_defs "}"
|
||||
|
||||
release_id = "hp-ux" | "aix" | "sun" | "usl" | "uxp" | "default"
|
||||
|
||||
record_defs = keyword_def "=" special_token |
|
||||
keyword_def "=" keyword_value
|
||||
|
||||
special_token = "<SRC>" | "<DEST>" | "<LNK>" |
|
||||
"<TYPE>" | "<MODE>" | "<OWNER>" | "<GROUP>"
|
||||
|
||||
keyword_def = identifier
|
||||
keyword_value = identifier
|
||||
|
||||
file_records = file_rec file_records |
|
||||
file_rec
|
||||
|
||||
file_rec = src_spec dest_specs
|
||||
|
||||
src_spec = a_out_loc | link_path
|
||||
|
||||
a_out_loc = < the build tree-top relative path to the source file >
|
||||
|
||||
link_path = < the full path to the link source in the product >
|
||||
|
||||
dest_specs = dest_spec dest_specs |
|
||||
dest_spec
|
||||
|
||||
dest_spec = "{" release_id value_specs "}"
|
||||
|
||||
|
||||
value_spec = keyword "=" value
|
||||
|
||||
keyword = identifier
|
||||
value = identifier
|
||||
|
||||
identifier = < any sequence of non-whitespace characters which
|
||||
does not contain an unescaped instance of one of
|
||||
the syntax_chars >
|
||||
|
||||
syntax_chars = "{", ":", ";", "=", "}"
|
||||
|
||||
|
||||
82
cde/admin/IntegTools/dbTools/UDB.tools
Normal file
82
cde/admin/IntegTools/dbTools/UDB.tools
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
UDB TOOLS
|
||||
---------
|
||||
|
||||
The udb tools are located in the shared source tree in:
|
||||
/x/cdesrc/admin/IntegTools/dbTools
|
||||
|
||||
The basic tools for manipulating "udb" databases are:
|
||||
|
||||
udbParseLib.awk -- the awk parser for "udb" files.
|
||||
This awk file contains functions which read the udb
|
||||
databases into memory and set up awk-style
|
||||
associative arrays of keyword value pairs
|
||||
for all the file entries. This "library"
|
||||
also contains the default set of print
|
||||
routines that allow the database information
|
||||
to be printed in a number of different
|
||||
formats.
|
||||
Custom print routines can easily
|
||||
be written by following the conventions used
|
||||
in the default print routines.
|
||||
This parser is used by "udbToAny.ksh" and other
|
||||
scripts which manipulate the ".udb" databases.
|
||||
|
||||
udbToAny.ksh -- A ksh front end which allows the contents of the
|
||||
"udb" file to be transformed into a number of different
|
||||
formats. It also accepts the name of "custom" awk print
|
||||
routine which can do new and mysterious things. The
|
||||
most useful output at present is the "-toLst" option which
|
||||
produces output suitable for the "mkProd" script.
|
||||
NOTE: This script accepts more than one "udb" file
|
||||
as input but only the Release Definitions from the first
|
||||
udb file will be applied.
|
||||
|
||||
mkProd -- a ksh script which will create a product tree from the
|
||||
files in a build tree based on the contents of its input.
|
||||
This script takes a one-line format (.lst format) as input.
|
||||
This one-line format can be generated from a "udb" file by
|
||||
using the "-toLst" option in "udbToAny.ksh".
|
||||
This script calls two other ksh scripts "uncomment"
|
||||
and "linksLast". They do very simple tasks and should
|
||||
probably be rewritten as simple ksh functions in mkProd.
|
||||
NOTE: There is shell code to do automatic stripping of
|
||||
executables and compression of man pages etc. but
|
||||
most of that is turned off.
|
||||
|
||||
|
||||
There are other more complicated tools that act on "udb" databases,
|
||||
but they are hp-ux specific.
|
||||
|
||||
Example 1
|
||||
---------
|
||||
Suppose /x/cde_hpux is a build tree containing a successful hpux build.
|
||||
Suppose COE-RUN.udb and COE-RUN-ADMIN.udb are databases defining the
|
||||
COE-RUN product.
|
||||
To create a product tree at: "/prod/hpux/COE-RUN"
|
||||
run the following two commands (as root):
|
||||
|
||||
1) udbToAny.ksh -ReleaseStream hp-ux -toLst COE-RUN.udb COE-RUN-ADMIN.udb > COE-RUN.lst
|
||||
2) mkProd -D /prod/hpux/COE-RUN -S /x/cde_hpux COE-RUN.lst
|
||||
|
||||
NOTE: mkProd -f COE-RUN -D /prod/hpux -S /x/cde_hpux COE-RUN.lst
|
||||
would produce essentially the same results as 2) above.
|
||||
|
||||
Example 2
|
||||
---------
|
||||
Suppose we wanted to install the above bits on a test system. Then
|
||||
as root:
|
||||
|
||||
1) udbToAny.ksh -ReleaseStream hp-ux -toLst COE-RUN.udb COE-RUN-ADMIN.udb
|
||||
| mkProd -D / -S /x/cde_hpux
|
||||
|
||||
will install the bits on your root file system.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
311
cde/admin/IntegTools/dbTools/dinstallCDE.src
Executable file
311
cde/admin/IntegTools/dbTools/dinstallCDE.src
Executable file
|
|
@ -0,0 +1,311 @@
|
|||
XCOMM! /bin/ksh
|
||||
XCOMM $XConsortium: dinstallCDE.src /main/8 1996/11/25 14:20:36 drk $
|
||||
|
||||
XCOMM
|
||||
XCOMM This script uses the 'CDE' configuration scripts to de-install the Desktop
|
||||
XCOMM environment.
|
||||
XCOMM
|
||||
XCOMM this script accepts the following parameters:
|
||||
XCOMM
|
||||
XCOMM Optional parameters:
|
||||
XCOMM
|
||||
XCOMM -f <filesets> -- a quoted, space-separated list of
|
||||
XCOMM filesets to unload. The .udb
|
||||
XCOMM extension is not required.
|
||||
XCOMM
|
||||
XCOMM -clean -- remove the temporaray and configuration directories
|
||||
XCOMM -cleanVar-- remove the temporary directory but NOT the
|
||||
XCOMM configuration directory
|
||||
XCOMM -prog -- load only the development environment
|
||||
XCOMM -runtime -- load only the runtime environment
|
||||
XCOMM
|
||||
XCOMM ##########################################################################
|
||||
|
||||
#define HASH #
|
||||
#define STAR *
|
||||
|
||||
REVISION="$(echo "$Revision: /main/8 $" | awk '{print $2}')"
|
||||
|
||||
Log()
|
||||
{
|
||||
echo "$1" | tee -a /tmp/dinstallCDE.log
|
||||
}
|
||||
|
||||
DoFilesetScript()
|
||||
{
|
||||
typeset ScriptName
|
||||
|
||||
FilesetName=$1
|
||||
ScriptName=$2 # use long config file name (configFoo)
|
||||
|
||||
test_string=${DATABASE_FILES#*$FilesetName}
|
||||
if (( ${#DATABASE_FILES} > ${#test_string} ))
|
||||
then
|
||||
if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
|
||||
then
|
||||
Log "Executing $PLATFORM specific $FilesetName de-customize script"
|
||||
$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -d 2>&1 | \
|
||||
tee -a /tmp/$ScriptName.dverify
|
||||
elif [ -x $POST_INSTALL_DIR/$ScriptName ]
|
||||
then
|
||||
Log "Executing $FilesetName de-customize script"
|
||||
$POST_INSTALL_DIR/$ScriptName -d 2>&1 | tee -a /tmp/$ScriptName.dverify
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
DoLangScript()
|
||||
{
|
||||
typeset ScriptName
|
||||
|
||||
if [ "$BUILD_TREE" = "" ]; then
|
||||
ScriptName=$2 # use short config file name (foo.cfg)
|
||||
else
|
||||
ScriptName=$1 # use long config file name (configFoo)
|
||||
fi
|
||||
|
||||
if [ $CDECONFIGDIR = "CONFIG" ]; then
|
||||
typeset -u ScriptName
|
||||
fi
|
||||
|
||||
if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
|
||||
then
|
||||
Log "Executing $PLATFORM specific $FilesetName de-customize script"
|
||||
$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -d $3 2>&1 | \
|
||||
tee -a /tmp/$ScriptName.dverify
|
||||
elif [ -x $POST_INSTALL_DIR/$ScriptName ]
|
||||
then
|
||||
Log "Executing $FilesetName de-customize script"
|
||||
$POST_INSTALL_DIR/$ScriptName -d $3 2>&1 | tee -a /tmp/$ScriptName.dverify
|
||||
fi
|
||||
}
|
||||
|
||||
DoScripts()
|
||||
{
|
||||
Log " "
|
||||
|
||||
DoFilesetScript CDE-TT configTT tt.cfg
|
||||
DoFilesetScript CDE-MIN configMin min.cfg
|
||||
DoFilesetScript CDE-RUN configRun run.cfg
|
||||
DoFilesetScript CDE-HELP-C configHelp help.cfg
|
||||
DoFilesetScript CDE-HELP-PRG configHelpPrg helpprg.cfg
|
||||
DoFilesetScript CDE-HELP-RUN configHelpRun helprun.cfg
|
||||
DoFilesetScript CDE-SHLIBS configShlibs shlibs.cfg
|
||||
DoFilesetScript CDE-DEMOS configDemos demos.cfg
|
||||
DoFilesetScript CDE-FONTS configFonts fonts.cfg
|
||||
DoFilesetScript CDE-ICONS configIcons icons.cfg
|
||||
DoFilesetScript CDE-INC configInc inc.cfg
|
||||
DoFilesetScript CDE-MAN configMan man.cfg
|
||||
DoFilesetScript CDE-MAN-DEV configManDev mandev.cfg
|
||||
DoFilesetScript CDE-MSG-C configMsgCat msgcat.cfg
|
||||
DoFilesetScript CDE-PRG configPrg prg.cfg
|
||||
|
||||
HASH see if a lang has been specified and configure backdrops and
|
||||
HASH palettes if it has.
|
||||
|
||||
if [ "$LangOption" != "" ]
|
||||
then
|
||||
DoLangScript configLang lang.cfg $theLang
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
USAGE()
|
||||
{
|
||||
echo "Usage: $(basename $0) [options]"
|
||||
echo ""
|
||||
echo "\tOptions:"
|
||||
echo ""
|
||||
echo "\t[-a <udb directory>]\t\talternate place to get the"
|
||||
echo "\t\t\t\t\tudb files from."
|
||||
echo "\t[-f <filesets>]\t\t\tspecify filesets to be unloaded."
|
||||
echo "\t\t\t\t\tThe list should be double-quoted,"
|
||||
echo "\t\t\t\t\tspace-separated, with no .udb"
|
||||
echo "\t\t\t\t\textensions."
|
||||
echo ""
|
||||
echo "\t[-clean]\t\t\tremove the temporary and configuration"
|
||||
echo "\t\t\t\t\tdirectories"
|
||||
echo "\t[-cleanVar]\t\t\tremove the temporary but NOT the "
|
||||
echo "\t\t\t\t\tconfiguration directory"
|
||||
echo "\t[-prog]\t\t\t\tload only the development environment"
|
||||
echo "\t[-runtime]\t\t\tload only the runtime environment"
|
||||
echo "\t[-relative]\t\t\trun the relative-located config scripts"
|
||||
echo "\t[-lang LANG]\t\t\tspecify LANG to use for backdrops and"
|
||||
echo "\t\t\t\t\tpalettes"
|
||||
echo ""
|
||||
}
|
||||
|
||||
ORIGINAL_COMMAND_LINE="$*"
|
||||
|
||||
XCOMM Set which system we are on
|
||||
BUILDSYSTEM=$(uname)
|
||||
|
||||
PLATFORM=""
|
||||
PLATFORM_SCRIPT_DIR=""
|
||||
|
||||
XCOMM
|
||||
XCOMM Set system
|
||||
XCOMM
|
||||
if [ $BUILDSYSTEM = "AIX" ];
|
||||
then
|
||||
PLATFORM=aix
|
||||
PLATFORM_SCRIPT_DIR=ibm
|
||||
elif [ $BUILDSYSTEM = "SunOS" ];
|
||||
then
|
||||
PLATFORM=sun
|
||||
PLATFORM_SCRIPT_DIR=sun
|
||||
elif [ $BUILDSYSTEM = "UNIX_SV" ];
|
||||
then
|
||||
PLATFORM=usl
|
||||
PLATFORM_SCRIPT_DIR=usl
|
||||
elif [ $BUILDSYSTEM = "UNIX_System_V" ];
|
||||
then
|
||||
PLATFORM=uxp
|
||||
PLATFORM_SCRIPT_DIR=uxp
|
||||
elif [ $BUILDSYSTEM = "OSF1" ];
|
||||
then
|
||||
PLATFORM=dec
|
||||
PLATFORM_SCRIPT_DIR=dec
|
||||
else # Build system = HP
|
||||
PLATFORM=hp-ux
|
||||
PLATFORM_SCRIPT_DIR=hp
|
||||
fi
|
||||
|
||||
if [ "$PLATFORM" = "aix" ];
|
||||
then
|
||||
USER=`/bin/whoami`
|
||||
elif [ "$PLATFORM" = "sun" -o "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ];
|
||||
then
|
||||
USER=`/usr/ucb/whoami`
|
||||
else
|
||||
USER=`/usr/bin/whoami`
|
||||
fi
|
||||
|
||||
if [ "$USER" != "root" ];
|
||||
then
|
||||
USAGE
|
||||
echo ""
|
||||
echo "You must be root to run this script"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PATH=/bin:/usr/bin:/etc:/usr/bin/X11:
|
||||
export PATH
|
||||
|
||||
CLEANING="no"
|
||||
CLEANING_ETC="no"
|
||||
USE_ALTERNATE_UDB_DIR="no"
|
||||
USE_RELATIVE="no"
|
||||
STARTING_DIR=$PWD
|
||||
DATABASE_FILES=""
|
||||
LeaveLinks="no"
|
||||
REMOVE_LINKS="no"
|
||||
CLEAN_DAEMONS="yes"
|
||||
theLang=""
|
||||
DEVELOP_ENV="yes"
|
||||
RUNTIME_ENV="yes"
|
||||
|
||||
rm -f /tmp/dinstallCDE.log
|
||||
|
||||
Log "Options specified..."
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-a) Log " - alternate place to get the udb files from"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
ALTERNATE_UDB_DIR=$1
|
||||
USE_ALTERNATE_UDB_DIR="yes"
|
||||
shift;
|
||||
;;
|
||||
-f) Log " - load specific filesets"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
DATABASE_FILES=$1
|
||||
shift;
|
||||
;;
|
||||
-clean) Log " - delete all three cde directories"
|
||||
CLEANING="yes"
|
||||
CLEANING_ETC="yes"
|
||||
shift;
|
||||
;;
|
||||
-cleanVar) Log " - delete only temporary and installation directories"
|
||||
CLEANING="yes"
|
||||
shift;
|
||||
;;
|
||||
-relative) Log " - run the relative-located config scripts"
|
||||
USE_RELATIVE="yes"
|
||||
shift;
|
||||
;;
|
||||
-prog) Log " - remove only the development environment"
|
||||
RUNTIME_ENV="no"
|
||||
shift;
|
||||
;;
|
||||
-runtime) Log " - remove only the runtime environment"
|
||||
DEVELOP_ENV="no"
|
||||
shift;
|
||||
;;
|
||||
-lang) Log " - configure backdrops and palettes for LANG"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
theLang=$1
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
TOOL_DIR=$BUILD_TREE/admin/IntegTools/dbTools
|
||||
if [ "$USE_RELATIVE" = "yes" ]
|
||||
then
|
||||
POST_INSTALL_DIR=../post_install
|
||||
else
|
||||
POST_INSTALL_DIR=$BUILD_TREE/admin/IntegTools/post_install
|
||||
fi
|
||||
|
||||
if [ "$USE_ALTERNATE_UDB_DIR" = "yes" ]
|
||||
then
|
||||
DATABASE_DIR=$ALTERNATE_UDB_DIR/databases
|
||||
else
|
||||
DATABASE_DIR=$BUILD_TREE/databases
|
||||
fi
|
||||
|
||||
if [ "$DATABASE_FILES" = "" ]
|
||||
then
|
||||
if [ "$DEVELOP_ENV" = "yes" -a "$RUNTIME_ENV" = "yes" ]
|
||||
then
|
||||
DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
|
||||
CDE-MSG-C CDE-HELP-C CDE-SHLIBS CDE-HELP-PRG \
|
||||
CDE-PRG CDE-INC CDE-DEMOS CDE-MAN-DEV CDE-ICONS \
|
||||
CDE-FONTS"
|
||||
elif [ "$DEVELOP_ENV" = "yes" ]
|
||||
then
|
||||
DATABASE_FILES="CDE-HELP-PRG CDE-PRG CDE-INC CDE-DEMOS \
|
||||
CDE-MAN-DEV CDE-SHLIBS"
|
||||
elif [ "$RUNTIME_ENV" = "yes" ]
|
||||
then
|
||||
DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
|
||||
CDE-HELP-C CDE-MSG-C CDE-SHLIBS CDE-ICONS CDE-FONTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
INSTALL_LOCATION=CDE_INSTALLATION_TOP
|
||||
CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP
|
||||
LOGFILES_LOCATION=CDE_LOGFILES_TOP
|
||||
|
||||
DoScripts
|
||||
|
||||
echo "Done."
|
||||
echo ""
|
||||
echo "See /tmp/dinstallCDE.log for a log of this de-install session."
|
||||
echo ""
|
||||
964
cde/admin/IntegTools/dbTools/installCDE.src
Executable file
964
cde/admin/IntegTools/dbTools/installCDE.src
Executable file
|
|
@ -0,0 +1,964 @@
|
|||
XCOMM! /bin/ksh
|
||||
XCOMM $XConsortium: installCDE.src /main/20 1996/11/25 14:21:13 drk $
|
||||
|
||||
XCOMM
|
||||
XCOMM This script uses the 'CDE' databases to install either the Desktop
|
||||
XCOMM environment on a specified machine or creates a tar ball to be used
|
||||
XCOMM in an install process.
|
||||
XCOMM
|
||||
XCOMM this script accepts the following parameters:
|
||||
XCOMM -s <source> -- The top of build tree where the files are
|
||||
XCOMM gathered from.
|
||||
XCOMM -z <package> -- The desktop install package
|
||||
XCOMM
|
||||
XCOMM Optional parameters:
|
||||
XCOMM
|
||||
XCOMM -t <package destination> -- where to store install package
|
||||
XCOMM -pI <actual install location> -- where CDE_INSTALLATION_TOP will be linked to.
|
||||
XCOMM -pC <actual config location> -- where CDE_CONFIGURATION_TOP will be linked to.
|
||||
XCOMM -pV <actual var location> -- where CDE_LOGFILES_TOP will be linked to.
|
||||
XCOMM -a <alternate udb directory>
|
||||
XCOMM -f <filesets> -- a quoted, space-separated list of
|
||||
XCOMM filesets to load. The .udb extension
|
||||
XCOMM is not required.
|
||||
XCOMM
|
||||
XCOMM -clean -- remove the temporary, configuration and installation
|
||||
XCOMM directories
|
||||
XCOMM -cleanTwo-- remove the temporary and installation directories
|
||||
XCOMM but NOT the configuration directory
|
||||
XCOMM -cleanEtc-- remove the configuration directories
|
||||
XCOMM -prog -- load only the development environment
|
||||
XCOMM -runtime -- load only the runtime environment
|
||||
XCOMM -pack -- create packing list
|
||||
XCOMM -pseudo -- don't configure the desktop
|
||||
XCOMM -nocompress -- don't compress the tarball (-t only)
|
||||
XCOMM
|
||||
XCOMM -Lang -- load the localized filesets
|
||||
XCOMM -LinkStepOnly -- set up the -pI, -pC, and -pV links
|
||||
XCOMM then exit
|
||||
XCOMM -DontRunScripts -- stop after installation
|
||||
XCOMM -RunScriptsOnly -- only execute the scripts
|
||||
XCOMM -configureOnly -- only configure the desktop
|
||||
XCOMM
|
||||
XCOMM ##########################################################################
|
||||
|
||||
#define HASH #
|
||||
#define STAR *
|
||||
|
||||
|
||||
REVISION="$(echo "$Revision: /main/20 $" | awk '{print $2}')"
|
||||
|
||||
Log()
|
||||
{
|
||||
echo "$1" | tee -a /tmp/installCDE.log
|
||||
}
|
||||
|
||||
MakeTarball()
|
||||
{
|
||||
Log "\nGenerating UNIX Desktop install package $DATE in $TARBALL_LOCATION"
|
||||
HASH
|
||||
HASH create installable tarball
|
||||
HASH
|
||||
Log "Creating tarball..."
|
||||
|
||||
if [ $PLATFORM = "usl" -o "$PLATFORM" = "uxp" ]
|
||||
then
|
||||
ulimit -f unlimited
|
||||
fi
|
||||
|
||||
DIRNAME=build.$DATE
|
||||
mkdir -p $TARBALL_LOCATION/$DIRNAME
|
||||
cd /
|
||||
echo $DATE >$LOGFILES_LOCATION/.build.$DATE
|
||||
chown bin $LOGFILES_LOCATION/.build.$DATE
|
||||
|
||||
if [ "$COMPRESS_TARBALL" = "yes" ]; then
|
||||
tar -cf - $INSTALL_LOCATION/STAR \
|
||||
2>$TARBALL_LOCATION/$DIRNAME/extract.err |
|
||||
compress -c >$TARBALL_LOCATION/$DIRNAME/dttar.Z
|
||||
else
|
||||
tar -cf $TARBALL_LOCATION/$DIRNAME/dt.tar \
|
||||
$INSTALL_LOCATION/STAR \
|
||||
2>$TARBALL_LOCATION/$DIRNAME/extract.err 2>&1
|
||||
fi
|
||||
|
||||
if [ "$ACTUAL_INSTALLATION_LOC" = "" ]; then
|
||||
actualInstallDir=$INSTALL_LOCATION
|
||||
else
|
||||
actualInstallDir=$ACTUAL_INSTALLATION_LOC
|
||||
fi
|
||||
let size=$(du -s $actualInstallDir | awk '{print $1}')*512
|
||||
|
||||
HASH load installation fileset *after* tarball generated
|
||||
LoadFileSet "" "CDE-INSTALL"
|
||||
|
||||
HASH create config dir
|
||||
destPost=$TARBALL_LOCATION/$DIRNAME/config
|
||||
mkdir $destPost
|
||||
|
||||
HASH copy config and platform config scripts
|
||||
src=$INSTALL_LOCATION/install/$PLATFORM_SCRIPT_DIR
|
||||
cp $src/config/STAR.cfg $destPost
|
||||
|
||||
HASH copy this script and install.dt platform overrides
|
||||
cp $src/install.dto $TARBALL_LOCATION/$DIRNAME/install.dto
|
||||
cp $src/install.cde $TARBALL_LOCATION/$DIRNAME/install.cde
|
||||
chmod 755 $TARBALL_LOCATION/$DIRNAME/install.cde
|
||||
|
||||
cd /
|
||||
|
||||
Log "done."
|
||||
|
||||
cat >$TARBALL_LOCATION/$DIRNAME/dt.pkg <<FIN
|
||||
PLATFORM: $PLATFORM
|
||||
VERSION: $REVISION
|
||||
TS: $DATE
|
||||
COMPRESSED: $COMPRESS_TARBALL
|
||||
SIZE: $size
|
||||
CL: $ORIGINAL_COMMAND_LINE
|
||||
FILESETS: $DATABASE_FILES
|
||||
FIN
|
||||
|
||||
cat >$TARBALL_LOCATION/$DIRNAME/build.status <<FIN
|
||||
The UNIX Desktop
|
||||
|
||||
BUILD: $DATE
|
||||
OVERALL STATUS: <not yet tested>
|
||||
OVERALL PERFORMANCE: <not yet tested>
|
||||
MAJOR PROBLEMS: <not yet tested>
|
||||
|
||||
FIN
|
||||
|
||||
chmod g+w $TARBALL_LOCATION/$DIRNAME/build.status
|
||||
}
|
||||
|
||||
DoFilesetScript()
|
||||
{
|
||||
typeset ScriptName
|
||||
|
||||
FilesetName=$1
|
||||
if [ "$BUILD_TREE" = "" ]; then
|
||||
ScriptName=$3 # use short config file name (foo.cfg)
|
||||
else
|
||||
ScriptName=$2 # use long config file name (configFoo)
|
||||
fi
|
||||
|
||||
if [ $CDECONFIGDIR = "CONFIG" ]; then
|
||||
typeset -u ScriptName
|
||||
fi
|
||||
|
||||
test_string=${DATABASE_FILES#*$FilesetName}
|
||||
if (( ${#DATABASE_FILES} > ${#test_string} ))
|
||||
then
|
||||
if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
|
||||
then
|
||||
Log "Executing $PLATFORM specific $FilesetName customize script"
|
||||
$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -e 2>&1 | \
|
||||
tee -a /tmp/installCDE.log
|
||||
elif [ -x $POST_INSTALL_DIR/$ScriptName ]
|
||||
then
|
||||
Log "Executing $FilesetName customize script"
|
||||
$POST_INSTALL_DIR/$ScriptName -e 2>&1 | tee -a /tmp/installCDE.log
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
DoScripts()
|
||||
{
|
||||
Log " "
|
||||
|
||||
DoFilesetScript CDE-TT configTT tt.cfg
|
||||
DoFilesetScript CDE-MIN configMin min.cfg
|
||||
DoFilesetScript CDE-SHLIBS configShlibs shlibs.cfg
|
||||
DoFilesetScript CDE-RUN configRun run.cfg
|
||||
}
|
||||
|
||||
CreatePackingList()
|
||||
{
|
||||
Log " "
|
||||
Log "Creating packing list."
|
||||
touch $INSTALL_LOCATION/Packing_list
|
||||
for i in `echo $DATABASE_FILES`
|
||||
do
|
||||
Log " for $i"
|
||||
$TOOL_DIR/udbToAny.ksh -toDB -ReleaseStream $PLATFORM $DATABASE_DIR/${i}.udb > /tmp/${i}.db
|
||||
if [ -r /tmp/${i}.db ]
|
||||
then
|
||||
for file in `fgrep install_target /tmp/${i}.db | cut -sf 2 -d \: `
|
||||
do
|
||||
echo "$file" >>$INSTALL_LOCATION/Packing_list
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
CleanDaemons()
|
||||
{
|
||||
HASH kill these processes so that they can be removed and new ones
|
||||
HASH installed
|
||||
|
||||
for i in inetd rpc.ttdbserver rpc.cmsd
|
||||
do
|
||||
if [ "$PLATFORM" = "aix" -a $i = "inetd" ]
|
||||
then
|
||||
lssrc -s inetd >/dev/null 2>&1
|
||||
if [ $? = "0" ]
|
||||
then
|
||||
stopsrc -s inetd >>/tmp/installCDE.log 2>&1
|
||||
fi
|
||||
else
|
||||
ps -ef | grep $i | grep -v grep >/tmp/tmppsout
|
||||
if [ -s /tmp/tmppsout ]
|
||||
then
|
||||
awk '{print "kill " $2}' /tmp/tmppsout | /bin/csh -f
|
||||
sleep 2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
rm -f /tmp/tmppsout
|
||||
}
|
||||
|
||||
RestartInetd()
|
||||
{
|
||||
HASH now restart inetd
|
||||
|
||||
OLDPWD=`pwd`
|
||||
cd /
|
||||
if [ "$PLATFORM" = "sun" -o "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ]
|
||||
then
|
||||
/usr/sbin/inetd -s
|
||||
elif [ "$PLATFORM" = "aix" ]
|
||||
then
|
||||
startsrc -s inetd >>/tmp/installCDE.log 2>&1
|
||||
elif [ "$PLATFORM" = "dec" ]
|
||||
then
|
||||
/usr/sbin/inetd
|
||||
else
|
||||
#ifdef hpV4
|
||||
/usr/sbin/inetd
|
||||
#else
|
||||
/etc/inetd
|
||||
#endif
|
||||
fi
|
||||
cd $OLDPWD
|
||||
}
|
||||
|
||||
CheckForActualLocations()
|
||||
{
|
||||
XCOMM
|
||||
XCOMM if different actual locations specified, set up the links
|
||||
XCOMM
|
||||
|
||||
|
||||
if [ "$CLEAN_DAEMONS" = "yes" ]
|
||||
then
|
||||
CleanDaemons
|
||||
fi
|
||||
|
||||
HASH remove the contents of the installation directory then the directory
|
||||
HASH itself
|
||||
|
||||
if [ "$CLEANING" = "yes" ]
|
||||
then
|
||||
Log "Removing $INSTALL_LOCATION contents... "
|
||||
if [ -d $INSTALL_LOCATION ]
|
||||
then
|
||||
rm -rf $INSTALL_LOCATION/STAR
|
||||
if [ "$LeaveLinks" = "yes" ]
|
||||
then
|
||||
if [ ! -L $INSTALL_LOCATION ]
|
||||
then
|
||||
rm -rf $INSTALL_LOCATION
|
||||
fi
|
||||
else
|
||||
if [ -L $INSTALL_LOCATION ]
|
||||
then
|
||||
rm -f $INSTALL_LOCATION
|
||||
else
|
||||
rm -rf $INSTALL_LOCATION
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CONFIGURE_ONLY" = "no" ]
|
||||
then
|
||||
if [ "$ACTUAL_INSTALLATION_LOC" != "" ]
|
||||
then
|
||||
|
||||
HASH
|
||||
HASH first create the actual directory - if not there
|
||||
HASH
|
||||
|
||||
if [ ! -d $ACTUAL_INSTALLATION_LOC ]
|
||||
then
|
||||
mkdir -p $ACTUAL_INSTALLATION_LOC
|
||||
if [ ! -d $ACTUAL_INSTALLATION_LOC ]
|
||||
then
|
||||
Log "cannot create $ACTUAL_INSTALLATION_LOC directory"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
ln -s $ACTUAL_INSTALLATION_LOC $INSTALL_LOCATION
|
||||
|
||||
else
|
||||
if [ ! -d $INSTALL_LOCATION -a ! -L $INSTALL_LOCATION ];
|
||||
then
|
||||
mkdir -p $INSTALL_LOCATION
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CLEAN_DAEMONS" = "yes" ]
|
||||
then
|
||||
RestartInetd
|
||||
fi
|
||||
|
||||
HASH remove the contents of the configuration directory
|
||||
|
||||
if [ "$CLEANING_ETC" = "yes" ]
|
||||
then
|
||||
Log "Removing $CONFIGURE_LOCATION contents... "
|
||||
if [ -d $CONFIGURE_LOCATION ]
|
||||
then
|
||||
rm -rf $CONFIGURE_LOCATION/STAR
|
||||
if [ "$LeaveLinks" = "yes" ]
|
||||
then
|
||||
if [ ! -L $CONFIGURE_LOCATION ]
|
||||
then
|
||||
rm -rf $CONFIGURE_LOCATION
|
||||
fi
|
||||
else
|
||||
if [ -L $CONFIGURE_LOCATION ]
|
||||
then
|
||||
rm -f $CONFIGURE_LOCATION
|
||||
else
|
||||
rm -rf $CONFIGURE_LOCATION
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$ACTUAL_CONFIGURATION_LOC" != "" ]
|
||||
then
|
||||
if [ ! -d $ACTUAL_CONFIGURATION_LOC ]
|
||||
then
|
||||
mkdir -p $ACTUAL_CONFIGURATION_LOC
|
||||
if [ ! -d $ACTUAL_CONFIGURATION_LOC ]
|
||||
then
|
||||
Log "cannot create $ACTUAL_CONFIGURATION_LOC directory"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
ln -s $ACTUAL_CONFIGURATION_LOC $CONFIGURE_LOCATION
|
||||
|
||||
else
|
||||
if [ ! -d $CONFIGURE_LOCATION -a ! -L $CONFIGURE_LOCATION ];
|
||||
then
|
||||
mkdir -p $CONFIGURE_LOCATION
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CLEANING" = "yes" ]
|
||||
then
|
||||
Log "Removing $LOGFILES_LOCATION contents... "
|
||||
if [ -d $LOGFILES_LOCATION ]
|
||||
then
|
||||
rm -rf $LOGFILES_LOCATION/STAR
|
||||
if [ "$LeaveLinks" = "yes" ]
|
||||
then
|
||||
if [ ! -L $LOGFILES_LOCATION ]
|
||||
then
|
||||
rm -rf $LOGFILES_LOCATION
|
||||
fi
|
||||
else
|
||||
if [ -L $LOGFILES_LOCATION ]
|
||||
then
|
||||
rm -f $LOGFILES_LOCATION
|
||||
else
|
||||
rm -rf $LOGFILES_LOCATION
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$ACTUAL_VAR_LOC" != "" ]
|
||||
then
|
||||
if [ ! -d $ACTUAL_VAR_LOC ]
|
||||
then
|
||||
mkdir -p $ACTUAL_VAR_LOC
|
||||
if [ ! -d $ACTUAL_VAR_LOC ]
|
||||
then
|
||||
Log "cannot create $ACTUAL_VAR_LOC directory"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
ln -s $ACTUAL_VAR_LOC $LOGFILES_LOCATION
|
||||
|
||||
else
|
||||
if [ ! -d $LOGFILES_LOCATION -a ! -L $LOGFILES_LOCATION ];
|
||||
then
|
||||
mkdir -p $LOGFILES_LOCATION
|
||||
fi
|
||||
fi
|
||||
|
||||
Log " "
|
||||
}
|
||||
|
||||
USAGE()
|
||||
{
|
||||
echo "Usage: $(basename $0) {-s <source>|-z <package>} [options]"
|
||||
echo ""
|
||||
echo "\t-s <source>\t\t\tthe top of the build tree"
|
||||
echo "\t-z <package>\t\tthe desktop install package"
|
||||
echo ""
|
||||
echo "\tOptions:"
|
||||
echo ""
|
||||
echo "\t[-t <package_destination>]\tif specified create an"
|
||||
echo "\t\t\t\t\tinstall package and store it in the"
|
||||
echo "\t\t\t\t\tdestination."
|
||||
echo "\t[-pI <actual install location>]\twhere" CDE_INSTALLATION_TOP "will be linked to."
|
||||
echo "\t[-pC <actual config location>]\twhere" CDE_CONFIGURATION_TOP "will be linked to."
|
||||
echo "\t[-pV <actual var location>]\twhere" CDE_LOGFILES_TOP "will be linked to."
|
||||
echo ""
|
||||
echo "\t[-a <udb directory>]\t\talternate place to get the"
|
||||
echo "\t\t\t\t\tudb files from."
|
||||
echo "\t[-f <filesets>]\t\t\tspecify filesets to be loaded."
|
||||
echo "\t\t\t\t\tThe list should be double-quoted,"
|
||||
echo "\t\t\t\t\tspace-separated, with no .udb"
|
||||
echo "\t\t\t\t\textensions."
|
||||
echo ""
|
||||
echo "\t[-clean]\t\t\tremove the temporary, configuration, and"
|
||||
echo "\t\t\t\t\tinstallation directory"
|
||||
echo "\t[-cleanTwo]\t\t\tremove the temporary and installation "
|
||||
echo "\t\t\t\t\tdirectory, but NOT the configuration directory"
|
||||
echo "\t[-cleanEtc]\t\t\tremove the configuration directory, but "
|
||||
echo "\t\t\t\t\NOT the temporary and installation directories"
|
||||
echo "\t[-prog]\t\t\t\tload only the development environment"
|
||||
echo "\t[-runtime]\t\t\tload only the runtime environment"
|
||||
echo "\t[-relative]\t\t\trun the relative-located config scripts"
|
||||
echo "\t[-pack]\t\t\t\tcreate a packing list"
|
||||
echo "\t[-pseudo]\t\t\tdo not configure desktop when installing"
|
||||
echo "\t[-nocompress]\t\t\tdo not compress tarball when creating package"
|
||||
echo "\t[-lang LANG]\t\t\tspecify LANG to load appropriate localized"
|
||||
echo "\t\t\t\t\tfilesets"
|
||||
echo "\t[-LeaveLinks]\t\t\t\tdo not delete the links after cleaning"
|
||||
echo ""
|
||||
echo "\t[-LinkStepOnly]\t\t\tset up the -pI, -pC, and -pV links"
|
||||
echo "\t\t\t\t\tthen exit"
|
||||
echo "\t[-DontRunScripts]\t\tstop after installation"
|
||||
echo "\t[-RunScriptsOnly]\t\tonly execute the scripts"
|
||||
echo "\t[-configureOnly]\t\tonly configure the desktop"
|
||||
echo ""
|
||||
echo "\tExamples:"
|
||||
echo ""
|
||||
echo "\tinstallCDE -s /x/cde_hp700_90"
|
||||
echo "\tinstallCDE -s /x/cde_aix_32 -f \"CDE_MIN CDE-SHLIBS\""
|
||||
echo "\tinstallCDE -s /x/cde_sun_52 -pI /bigdisk/opt/dt -clean"
|
||||
echo "\tinstallCDE -s /x/cde_sun_52 -pI /dtinstall -clean\\"
|
||||
echo "\t\t-pseudo -t /dtpackages -nocompress"
|
||||
}
|
||||
|
||||
XCOMM
|
||||
XCOMM LoadFileSet() - load a UDB file
|
||||
XCOMM $1 - fileset number
|
||||
XCOMM $2 - fileset name
|
||||
XCOMM
|
||||
LoadFileSet()
|
||||
{
|
||||
if [ "$1" = "" ]; then
|
||||
num=""
|
||||
else
|
||||
num="$1."
|
||||
fi
|
||||
|
||||
Log " $num installing database $2"
|
||||
Log " - creating ${2}.lst file"
|
||||
$TOOL_DIR/udbToAny.ksh -toLst -ReleaseStream $PLATFORM \
|
||||
$DATABASE_DIR/${2}.udb > /tmp/${2}.lst
|
||||
|
||||
Log " - installing ... \c"
|
||||
$TOOL_DIR/mkProd -D / -S $BUILD_TREE /tmp/${2}.lst \
|
||||
2>/tmp/${2}.err 1>/tmp/${2}.good
|
||||
Log "done."
|
||||
|
||||
Log " - checking for errors ..."
|
||||
rm -f /tmp/${2}.missing
|
||||
awk '{if ($1 == "ERROR:") print " " $4}' \
|
||||
/tmp/${2}.err >> /tmp/${2}.missing
|
||||
if [ -s /tmp/${2}.missing ]
|
||||
then
|
||||
Log " - missing files:"
|
||||
cat /tmp/${2}.missing | tee -a /tmp/installCDE.log
|
||||
fi
|
||||
}
|
||||
|
||||
ORIGINAL_COMMAND_LINE="$*"
|
||||
|
||||
XCOMM Set which system we are on
|
||||
BUILDSYSTEM=$(uname)
|
||||
|
||||
PLATFORM=""
|
||||
PLATFORM_SCRIPT_DIR=""
|
||||
|
||||
XCOMM
|
||||
XCOMM Set system
|
||||
XCOMM
|
||||
if [ $BUILDSYSTEM = "AIX" ];
|
||||
then
|
||||
PLATFORM=aix
|
||||
PLATFORM_SCRIPT_DIR=ibm
|
||||
elif [ $BUILDSYSTEM = "SunOS" ];
|
||||
then
|
||||
PLATFORM=sun
|
||||
PLATFORM_SCRIPT_DIR=sun
|
||||
elif [ $BUILDSYSTEM = "UNIX_SV" ];
|
||||
then
|
||||
PLATFORM=usl
|
||||
PLATFORM_SCRIPT_DIR=usl
|
||||
elif [ $BUILDSYSTEM = "UNIX_System_V" ];
|
||||
then
|
||||
PLATFORM=uxp
|
||||
PLATFORM_SCRIPT_DIR=uxp
|
||||
elif [ $BUILDSYSTEM = "OSF1" ];
|
||||
then
|
||||
PLATFORM=dec
|
||||
PLATFORM_SCRIPT_DIR=dec
|
||||
else # Build system = HP
|
||||
PLATFORM=hp-ux
|
||||
PLATFORM_SCRIPT_DIR=hp
|
||||
fi
|
||||
|
||||
if [ "$PLATFORM" = "aix" ];
|
||||
then
|
||||
USER=`/bin/whoami`
|
||||
elif [ "$PLATFORM" = "sun" -o "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ];
|
||||
then
|
||||
USER=`/usr/ucb/whoami`
|
||||
else
|
||||
USER=`/usr/bin/whoami`
|
||||
fi
|
||||
|
||||
if [ "$USER" != "root" ];
|
||||
then
|
||||
USAGE
|
||||
echo ""
|
||||
echo "You must be root to run this script"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ]
|
||||
then
|
||||
umask 000
|
||||
fi
|
||||
|
||||
unset TMPDIR
|
||||
|
||||
PATH=/bin:/usr/bin:/etc:/usr/bin/X11:
|
||||
export PATH
|
||||
|
||||
CLEANING="no"
|
||||
CLEANING_ETC="no"
|
||||
TARBALL="no"
|
||||
COMPRESS_TARBALL="yes"
|
||||
USE_ALTERNATE_UDB_DIR="no"
|
||||
DEVELOP_ENV="no"
|
||||
RUNTIME_ENV="no"
|
||||
USE_RELATIVE="no"
|
||||
STARTING_DIR=$PWD
|
||||
ACTUAL_INSTALLATION_LOC=""
|
||||
ACTUAL_CONFIGURATION_LOC=""
|
||||
ACTUAL_VAR_LOC=""
|
||||
CREATE_PACKING_LIST="no"
|
||||
DO_LINK_STEP_ONLY="no"
|
||||
DO_INSTALL_ONLY="no"
|
||||
RUN_SCRIPTS="yes"
|
||||
RUN_SCRIPTS_ONLY="no"
|
||||
DATABASE_FILES=""
|
||||
BUILD_TREE=""
|
||||
TAR_DIR=""
|
||||
LeaveLinks="no"
|
||||
REMOVE_LINKS="no"
|
||||
CLEAN_DAEMONS="yes"
|
||||
theLang=""
|
||||
CONFIGURE_ONLY="no"
|
||||
|
||||
rm -f /tmp/installCDE.log
|
||||
|
||||
Log "Options specified..."
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-s) Log " - get the build tree to extract from"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
BUILD_TREE=$1
|
||||
shift;
|
||||
;;
|
||||
-z) Log " - get the install package to extract from"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
TAR_TREE=$1
|
||||
shift;
|
||||
;;
|
||||
-t) Log " - where to put the install package"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
if [ "$SOURCE_TAR_FILE" = "" ]
|
||||
then
|
||||
TARBALL="yes"
|
||||
TARBALL_LOCATION=$1
|
||||
fi
|
||||
shift;
|
||||
;;
|
||||
-a) Log " - alternate place to get the udb files from"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
ALTERNATE_UDB_DIR=$1
|
||||
USE_ALTERNATE_UDB_DIR="yes"
|
||||
shift;
|
||||
;;
|
||||
-f) Log " - load specific filesets"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
DATABASE_FILES=$1
|
||||
shift;
|
||||
;;
|
||||
-p) Log " - get all locations"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
ACTUAL_INSTALLATION_LOC=$1
|
||||
ACTUAL_CONFIGURATION_LOC=$1
|
||||
ACTUAL_VAR_LOC=$1
|
||||
shift;
|
||||
;;
|
||||
-pI) Log " - get actual installation location"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
ACTUAL_INSTALLATION_LOC=$1
|
||||
shift;
|
||||
;;
|
||||
-pC) Log " - get actual configuration location"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
ACTUAL_CONFIGURATION_LOC=$1
|
||||
shift;
|
||||
;;
|
||||
-pV) Log " - get actual var location"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
ACTUAL_VAR_LOC=$1
|
||||
shift;
|
||||
;;
|
||||
-clean) Log " - delete all three cde directories"
|
||||
CLEANING="yes"
|
||||
CLEANING_ETC="yes"
|
||||
shift;
|
||||
;;
|
||||
-cleanTwo) Log " - delete only temporary and installation directories"
|
||||
CLEANING="yes"
|
||||
shift;
|
||||
;;
|
||||
-cleanEtc) Log " - delete only the configuration directory"
|
||||
CLEANING_ETC="yes"
|
||||
shift;
|
||||
;;
|
||||
-prog) Log " - load only the development environment"
|
||||
DEVELOP_ENV="yes"
|
||||
RUNTIME_ENV="no"
|
||||
shift;
|
||||
;;
|
||||
-runtime) Log " - load only the runtime environment"
|
||||
RUNTIME_ENV="yes"
|
||||
DEVELOP_ENV="no"
|
||||
shift;
|
||||
;;
|
||||
-relative) Log " - run the relative-located config scripts"
|
||||
USE_RELATIVE="yes"
|
||||
shift;
|
||||
;;
|
||||
-pack) Log " - create a packing list"
|
||||
CREATE_PACKING_LIST="yes"
|
||||
shift;
|
||||
;;
|
||||
-LeaveLinks) Log " - do not remove the links"
|
||||
LeaveLinks="yes"
|
||||
shift;
|
||||
;;
|
||||
-LinkStepOnly) Log " - do link step only"
|
||||
DO_LINK_STEP_ONLY="yes"
|
||||
shift;
|
||||
;;
|
||||
-DontRunScripts) Log " - stop after installation"
|
||||
DO_INSTALL_ONLY="yes"
|
||||
shift;
|
||||
;;
|
||||
-RunScriptsOnly) Log " - only run scripts"
|
||||
RUN_SCRIPTS_ONLY="yes"
|
||||
shift;
|
||||
;;
|
||||
-pseudo) Log " - pseudo install"
|
||||
RUN_SCRIPTS="no"
|
||||
REMOVE_LINKS="yes"
|
||||
CLEAN_DAEMONS="no"
|
||||
shift;
|
||||
;;
|
||||
-nocompress) Log " - do not compress tarball"
|
||||
COMPRESS_TARBALL="no"
|
||||
shift;
|
||||
;;
|
||||
-lang) Log " - load localized filesets"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
USAGE
|
||||
exit 1;
|
||||
}
|
||||
theLang=$1
|
||||
shift;
|
||||
;;
|
||||
-configureOnly) Log " - Configure only"
|
||||
CONFIGURE_ONLY="yes"
|
||||
CLEAN_DAEMONS="yes"
|
||||
shift;
|
||||
;;
|
||||
*) Log " - unknown option"
|
||||
USAGE
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
if [ -z "$BUILD_TREE" -a -z "$TAR_TREE" ]
|
||||
then
|
||||
USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$BUILD_TREE" != "" -a ! -d "$BUILD_TREE" ]
|
||||
then
|
||||
Log "Build tree does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$TAR_TREE" != "" -a ! -d "$TAR_TREE" ]
|
||||
then
|
||||
Log "Tar tree does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CDEPACKAGE=dt.pkg
|
||||
CDETARFILE=dt.tar
|
||||
CDETARFILEZ=dttar.Z
|
||||
CDECONFIGDIR=config
|
||||
|
||||
XCOMM
|
||||
XCOMM get the current time stamp if going to create a tarball
|
||||
XCOMM
|
||||
|
||||
if [ $TARBALL = "yes" ];
|
||||
then
|
||||
set -- `/bin/date`
|
||||
DATE=$2_$3_$4_$6
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_TREE" -a ${0##STAR/} = INSTALL.CDE ]; then
|
||||
typeset -u CDEPACKAGE
|
||||
typeset -u CDETARFILE
|
||||
typeset -u CDETARFILEZ
|
||||
typeset -u CDECONFIGDIR
|
||||
fi
|
||||
|
||||
TOOL_DIR=$BUILD_TREE/admin/IntegTools/dbTools
|
||||
if [ "$USE_RELATIVE" = "yes" ]
|
||||
then
|
||||
POST_INSTALL_DIR=../post_install
|
||||
else
|
||||
if [ -z "$BUILD_TREE" ]
|
||||
then
|
||||
POST_INSTALL_DIR=$TAR_TREE/$CDECONFIGDIR
|
||||
else
|
||||
POST_INSTALL_DIR=$BUILD_TREE/admin/IntegTools/post_install
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$USE_ALTERNATE_UDB_DIR" = "yes" ]
|
||||
then
|
||||
DATABASE_DIR=$ALTERNATE_UDB_DIR/databases
|
||||
else
|
||||
DATABASE_DIR=$BUILD_TREE/databases
|
||||
fi
|
||||
|
||||
if [ "$DATABASE_FILES" = "" ]
|
||||
then
|
||||
if [ "$DEVELOP_ENV" = "yes" ]
|
||||
then
|
||||
DATABASE_FILES="CDE-HELP-PRG CDE-PRG CDE-INC CDE-DEMOS \
|
||||
CDE-MAN-DEV CDE-SHLIBS"
|
||||
elif [ "$RUNTIME_ENV" = "yes" ]
|
||||
then
|
||||
DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
|
||||
CDE-HELP-C CDE-MSG-C CDE-SHLIBS CDE-ICONS CDE-FONTS \
|
||||
CDE-INFO CDE-INFOLIB-C"
|
||||
else
|
||||
DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
|
||||
CDE-MSG-C CDE-HELP-C CDE-SHLIBS CDE-HELP-PRG \
|
||||
CDE-PRG CDE-INC CDE-DEMOS CDE-MAN-DEV CDE-ICONS \
|
||||
CDE-FONTS CDE-INFO CDE-INFOLIB-C"
|
||||
fi
|
||||
|
||||
HASH now load any localized filesets
|
||||
|
||||
if [ "$DEVELOP_ENV" != "yes" ]
|
||||
then
|
||||
if [ "$theLang" != "" ]
|
||||
then
|
||||
DATABASE_FILES="$DATABASE_FILES CDE-$theLang CDE-MSG-$theLang \
|
||||
CDE-HELP-$theLang"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
INSTALL_LOCATION=CDE_INSTALLATION_TOP
|
||||
CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP
|
||||
LOGFILES_LOCATION=CDE_LOGFILES_TOP
|
||||
|
||||
if [ -L $INSTALL_LOCATION -a "$CONFIGURE_ONLY" != "yes" ]
|
||||
then
|
||||
touch $INSTALL_LOCATION/foo >/dev/null 2>/dev/null
|
||||
if [ ! -f $INSTALL_LOCATION/foo ]
|
||||
then
|
||||
Log "Insufficient permissions to install CDE files in $INSTALL_LOCATION"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -O $INSTALL_LOCATION/foo ]
|
||||
then
|
||||
Log "Root access to $INSTALL_LOCATION is required for CDE installation."
|
||||
exit 1
|
||||
fi
|
||||
rm $INSTALL_LOCATION/foo
|
||||
fi
|
||||
|
||||
if [ -d $INSTALL_LOCATION ]
|
||||
then
|
||||
if [ -x $INSTALL_LOCATION/bin -a ! -d $INSTALL_LOCATION/bin ]
|
||||
then
|
||||
rm -f $INSTALL_LOCATION/bin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CONFIGURE_ONLY" = "yes" ]
|
||||
then
|
||||
CheckForActualLocations
|
||||
DoScripts
|
||||
Log "Configuration completed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$RUN_SCRIPTS_ONLY" = "yes" ]
|
||||
then
|
||||
DoScripts
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CheckForActualLocations
|
||||
|
||||
if [ "$DO_LINK_STEP_ONLY" = "yes" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$CREATE_PACKING_LIST" = "yes" ]
|
||||
then
|
||||
CreatePackingList
|
||||
exit 0
|
||||
fi
|
||||
|
||||
XCOMM
|
||||
XCOMM we are ready to load the environment ...
|
||||
XCOMM
|
||||
|
||||
if [ "$BUILD_TREE" != "" ]
|
||||
then
|
||||
Log "Load the Desktop from $BUILD_TREE"
|
||||
|
||||
cd $STARTING_DIR
|
||||
let j=1
|
||||
for i in `echo $DATABASE_FILES`
|
||||
do
|
||||
LoadFileSet "$j" "$i"
|
||||
let j=j+1
|
||||
done
|
||||
else
|
||||
Log "Load the Desktop from $TAR_TREE"
|
||||
compressed=$(awk '/COMPRESSED: /{print $2}' $TAR_TREE/$CDEPACKAGE)
|
||||
if [ "$compressed" = "yes" ]; then
|
||||
uncompress <$TAR_TREE/$CDETARFILEZ | tar xvf - $INSTALL_LOCATION
|
||||
else
|
||||
tar -xvf $TAR_TREE/$CDETARFILE $INSTALL_LOCATION
|
||||
fi
|
||||
DATABASE_FILES=$(awk 'BEGIN {FS=":"} /FILESETS: /{print $2}' $TAR_TREE/$CDEPACKAGE)
|
||||
fi
|
||||
|
||||
Log " "
|
||||
Log "Desktop installed in $INSTALL_LOCATION"
|
||||
|
||||
if [ "$DO_INSTALL_ONLY" = "yes" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $TARBALL = "yes" ];
|
||||
then
|
||||
MakeTarball
|
||||
fi
|
||||
|
||||
cd $STARTING_DIR
|
||||
|
||||
if [ "$RUN_SCRIPTS" = "yes" ]
|
||||
then
|
||||
DoScripts
|
||||
fi
|
||||
|
||||
if [ "$REMOVE_LINKS" = "yes" ]
|
||||
then
|
||||
[ -L /usr/dt ] && rm /usr/dt
|
||||
[ -L /etc/dt ] && rm /etc/dt
|
||||
[ -L /var/dt ] && rm /var/dt
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
echo ""
|
||||
echo "See /tmp/installCDE.log for a log of this install session."
|
||||
echo ""
|
||||
23
cde/admin/IntegTools/dbTools/linksLast
Executable file
23
cde/admin/IntegTools/dbTools/linksLast
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#! /bin/ksh
|
||||
|
||||
#
|
||||
# Script to move all link refereces in a ".lst" file
|
||||
# to the end of the file.
|
||||
#
|
||||
|
||||
USAGE="Usage: $0 file.lst"
|
||||
|
||||
case $# in
|
||||
0) echo $USAGE;;
|
||||
1);;
|
||||
*) echo $USAGE;;
|
||||
esac
|
||||
|
||||
awk '
|
||||
/hard_link|sym_link/ { links[i++] = $0 ; next; }
|
||||
{ print $0 }
|
||||
END {
|
||||
if ( i > 0 )
|
||||
for ( i in links) print links[i];
|
||||
}
|
||||
' $@
|
||||
650
cde/admin/IntegTools/dbTools/mkProd
Executable file
650
cde/admin/IntegTools/dbTools/mkProd
Executable file
|
|
@ -0,0 +1,650 @@
|
|||
#! /bin/ksh
|
||||
|
||||
export SYSTYPE=bsd4.3
|
||||
|
||||
# This script is aimed at producing Apollo product tree but
|
||||
# it should work as well on hp-ux systems. There is at least
|
||||
# one special rule "-n" which should not be generated on hp-ux systems
|
||||
# where it is not necessary to run nroff on the man page sources.
|
||||
|
||||
|
||||
# Put "/etc" in the path
|
||||
# because this is where "chown" appears on bsd4.3 systems (i.e. apollo).
|
||||
# Put "/usr/apollo/bin" on the path to access "chacl" on apollo systems.
|
||||
|
||||
export PATH=":/etc:$PATH:/usr/apollo/bin:"
|
||||
typeset STRIP=""
|
||||
|
||||
|
||||
# this alias makes for more "beautiful" output.
|
||||
alias echo=print
|
||||
|
||||
#
|
||||
# Shell script to read a file full of destination/perm/source triples and
|
||||
# create data base entries in a format suitable for 8.0 release. All other
|
||||
# information defaults to the default values for now -- this should be correct
|
||||
# in most cases but may require editing of the result for those cases
|
||||
# needing special handling.
|
||||
#
|
||||
# Lst file syntax:
|
||||
# [<install-flags>] <destination_path> <perm> <src> [ <type> <owner> <group> <status> <processor> <resp_proj> ]
|
||||
#
|
||||
# <install-rule> ==> [optional] 2 character field encoding special actions to be invoked when
|
||||
# creating the product tree. In the absence of this field the file is subject
|
||||
# to defaults based on its name,destination directory and permissions.
|
||||
# valid values:
|
||||
# -- Do nothing special
|
||||
# c- compress the file
|
||||
# -n run it through an nroff pipeline
|
||||
# -s strip the file (should be a binary executable)
|
||||
#
|
||||
# <destination_path> ===> full path name on target system
|
||||
# <perm> ===> numeric permission (with leading 0)
|
||||
# <src> ===> build tree path name (relative to build tree root)
|
||||
# | full path name of link source
|
||||
# | "-" to ignore this field (source for directory not required)
|
||||
# <type> ===> "file" | "empty_dir" | "directory" | "hard_link" | NULL
|
||||
# <owner> ===> file owner name -- defaults to bin
|
||||
# <group> ===> file group ownership --- defaults to bin
|
||||
# <status> ===> "di----" default
|
||||
# <processor> ===> valid processor "3-" | "-8" | "38" -- defaults to "38"
|
||||
# <resp_proj> ===> responsible project --- defaults to "xwindows"
|
||||
#
|
||||
|
||||
Usage="Usage: $0 [-f filesetName] -D <desttree> -S <srctree> <file> ...\n
|
||||
\tfilesetName \t==> (optional) used to create subdirectory in desttree\n
|
||||
\tdesttree \t==> destination directory\n
|
||||
\tsrctree \t==> usually a build tree containing the source\n
|
||||
\tfile \t\t==> data base file in \".lst\" format"
|
||||
|
||||
FILE='file'
|
||||
STATUS='di----'
|
||||
PROCESSOR='378'
|
||||
DESTTREE='.'
|
||||
|
||||
if [ -f /com/ctnode ]; then
|
||||
# Apollo systems
|
||||
OWNER='root'
|
||||
GROUP='staff'
|
||||
# set flag used to test for soft links
|
||||
LNKTST="L"
|
||||
else
|
||||
# hp-ux systems (and all other systems)
|
||||
OWNER='bin'
|
||||
GROUP='bin'
|
||||
# set flag used to test for soft links
|
||||
LNKTST="h"
|
||||
fi
|
||||
|
||||
BUILD_TARGET='/'
|
||||
INSTALL_RULE='--'
|
||||
INSTALL_FLAGS=''
|
||||
ORDER='0'
|
||||
RESP_PROJ='xwindows'
|
||||
|
||||
# Set which system we are on
|
||||
BUILDSYSTEM=$(uname)
|
||||
|
||||
# Set system
|
||||
if [ $BUILDSYSTEM = "AIX" ];
|
||||
then
|
||||
PLATFORM=aix
|
||||
elif [ $BUILDSYSTEM = "SunOS" ];
|
||||
then
|
||||
PLATFORM=sun
|
||||
elif [ $BUILDSYSTEM = "UNIX_SV" ];
|
||||
then
|
||||
PLATFORM=usl
|
||||
elif [ $BUILDSYSTEM = "UNIX_System_V" ];
|
||||
then
|
||||
PLATFORM=uxp
|
||||
elif [ $BUILDSYSTEM = "OSF1" ];
|
||||
then
|
||||
PLATFORM=dec
|
||||
else # Build system = HP
|
||||
PLATFORM=hp-ux
|
||||
fi
|
||||
|
||||
if [ $PLATFORM = "aix" ];
|
||||
then
|
||||
USER=`/bin/whoami`
|
||||
elif [ $PLATFORM = "sun" -o $PLATFORM = "usl" -o $PLATFORM = "uxp" ];
|
||||
then
|
||||
USER=`/usr/ucb/whoami`
|
||||
else
|
||||
USER=`/usr/bin/whoami`
|
||||
fi
|
||||
|
||||
awkit() {
|
||||
awk '
|
||||
BEGIN {
|
||||
print "#"
|
||||
print "# TYPE RULE SRC DEST MODE OWNER GROUP LINKSRC"
|
||||
print ""
|
||||
}
|
||||
|
||||
/^[ ]*#/ { next }
|
||||
{
|
||||
# initialize install_rule to NULL
|
||||
install_rule=""
|
||||
|
||||
# skip blank lines
|
||||
if ( NF == 0 )
|
||||
next
|
||||
# do a little syntax checking
|
||||
|
||||
if ( $1 !~ /\// ) {
|
||||
# check for special install_rule values
|
||||
if ( $1 ~ /[-c][-ns]/ ) {
|
||||
# set the special install rule
|
||||
install_rule=$1
|
||||
|
||||
# shift the rest of the fields left
|
||||
for ( i = 1; i < NF; i++) {
|
||||
$i = $(i+1)
|
||||
}
|
||||
NF=NF-1
|
||||
}
|
||||
else {
|
||||
print "Syntax Error (line " NR ") destination path: " $1
|
||||
print "text: " $0
|
||||
next
|
||||
}
|
||||
}
|
||||
|
||||
if ( NF > 9 ) {
|
||||
print "Syntax Error (line " NR ") number of fields"
|
||||
print "text: " $0
|
||||
exit
|
||||
}
|
||||
|
||||
if ( $2 !~ /0[0-7][0-7]*/ ) {
|
||||
print "Syntax Error (line " NR ") perm : " $2
|
||||
print "text: " $0
|
||||
next
|
||||
}
|
||||
# if ( $4 ~ /link/ && $3 !~ /^\// && $3 !~ /`node_data/) {
|
||||
# changed to allow local link (using ./file syntax) -- Should this be
|
||||
# domain only?
|
||||
#
|
||||
if ( $4 ~ /link/ && $3 !~ /^\// && $3 !~ /`node_data/ && \
|
||||
$3 !~ /^\.\// && $3 !~ /^\.\.\// ) {
|
||||
print "Syntax Error (line " NR ") source: " $3
|
||||
print "text: " $0
|
||||
next
|
||||
}
|
||||
|
||||
# Check for special install rules
|
||||
# man pages are compressed use rule "c-"
|
||||
# font files are compressed use rule "c-"
|
||||
# directories have no source i.e. src = "-"
|
||||
|
||||
src = $3;
|
||||
link_src = "";
|
||||
type = "'$FILE'";
|
||||
owner = "'$OWNER'";
|
||||
group = "'$GROUP'";
|
||||
status = "'$STATUS'";
|
||||
processor = "'$PROCESSOR'";
|
||||
resp_proj = "'$RESP_PROJ'";
|
||||
if ( $4 != "" )
|
||||
{
|
||||
type = $4;
|
||||
if ( $4 ~ /link/ ) {
|
||||
src = "";
|
||||
if ( $3 ~ /^\// || $3 ~ /`node_data/ || \
|
||||
$3 ~ /^\.\// || $3 ~ /^\.\.\// )
|
||||
link_src = $3;
|
||||
else {
|
||||
print "Syntax Error (line " NR ") link_src: " $3
|
||||
print "text: " $0
|
||||
next;
|
||||
};
|
||||
}
|
||||
else if ( $4 == "directory" )
|
||||
if ( $3 != "-" )
|
||||
{
|
||||
print "Syntax Error (line " NR ") directory: " $3;
|
||||
print "text: " $0;
|
||||
next;
|
||||
}
|
||||
else
|
||||
src="";
|
||||
else if ( $4 == "empty_dir" )
|
||||
{
|
||||
resp_proj = "common";
|
||||
status = "------";
|
||||
if ( $3 != "-" )
|
||||
{
|
||||
print "Syntax Error (line " NR ") empty_dir: " $3;
|
||||
print "text: " $0;
|
||||
next;
|
||||
}
|
||||
else
|
||||
src="";
|
||||
}
|
||||
else if ( $4 == "file" && $3 == "-" )
|
||||
if ( $7 == "---cu-")
|
||||
src = "";
|
||||
}
|
||||
#
|
||||
# If owner an/or group are specified all previous fields (including
|
||||
# type) must be specified.
|
||||
#
|
||||
if ( $5 != "" )
|
||||
owner = $5;
|
||||
|
||||
if ( $6 != "" )
|
||||
group = $6;
|
||||
|
||||
if ( $7 != "" )
|
||||
status = $7
|
||||
|
||||
if ( $8 != "" )
|
||||
processor = $8;
|
||||
|
||||
if ($9 != "" )
|
||||
resp_proj= $9;
|
||||
|
||||
if ( install_rule != "" ) {
|
||||
; # install rule has been explicitly set -- do nothing
|
||||
}
|
||||
else if ( $1 ~ /\/usr\/man\/man.*\.Z\// )
|
||||
{
|
||||
install_rule = "c-";
|
||||
}
|
||||
else if ( $1 ~ /\/usr\/X11\/man\/cat[1-9]\/.*[1-9]/ )
|
||||
{
|
||||
install_rule = "-n";
|
||||
}
|
||||
else if ( $1 ~ /\/bsd4.3\/usr\/man\/cat[1-9]\/.*[1-9]/ )
|
||||
{
|
||||
install_rule = "-n";
|
||||
}
|
||||
else if ( $1 ~ /\/sys5.3\/usr\/catman\/.*man[1-9]\/.*[1-9]/ )
|
||||
{
|
||||
install_rule = "-n";
|
||||
}
|
||||
else if ( $1 ~ /.*\/fonts\/.*.scf$/ && $3 ~ /.*.snf$/ )
|
||||
{
|
||||
install_rule = "c-";
|
||||
}
|
||||
else if ( $1 ~ /.*\/fonts\/.*.snf\.Z$/ && $3 ~ /.*.snf$/ )
|
||||
{
|
||||
install_rule = "c-";
|
||||
}
|
||||
else if ( $1 ~ /^\/integration\// && $3 ~ /^doc\/upinfo\// )
|
||||
{
|
||||
install_rule = "";
|
||||
}
|
||||
else if ( $2 ~ /[1357]/ && $4 == "file" )
|
||||
{ # executable files may be stripped
|
||||
install_rule = "-s";
|
||||
}
|
||||
else
|
||||
install_rule = "'$INSTALL_RULE'";
|
||||
|
||||
|
||||
# print "install_target : " $1
|
||||
# print "fileset : " "'$FILESET'"
|
||||
# print "type : " type
|
||||
# print "status : " status
|
||||
# print "processor : " processor
|
||||
# print "mode : " $2
|
||||
# print "owner : " owner
|
||||
# print "group : " group
|
||||
# print "link_source : " link_src
|
||||
# print "build_target : " "'$BUILD_TARGET'"
|
||||
# print "install_rule_name : " install_rule
|
||||
# print "install_flags : " "'$INSTALL_FLAGS'"
|
||||
# print "a_out_location : " src
|
||||
# print "order : " "'$ORDER'"
|
||||
# print "responsible_project : " resp_proj
|
||||
# print "#"
|
||||
|
||||
if ( type ~ /.*link/ )
|
||||
src= link_src
|
||||
else if ( type ~ /.*directory/ )
|
||||
src="-"
|
||||
|
||||
print type, install_rule, src, $1, $2, owner ,group
|
||||
}
|
||||
|
||||
' $1
|
||||
}
|
||||
|
||||
#
|
||||
# createPath
|
||||
# function to create a directory path. (mkdir -p replacement on bsd4.3)
|
||||
#
|
||||
createPath()
|
||||
{
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "ERROR: \"$0\" invalid argument count" >&2
|
||||
echo " ARGS=$@"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Since we are SYSTYPE bsd4.3 "-x" won't work.
|
||||
if [ -r /sys5.3/bin/mkdir ]; then
|
||||
/sys5.3/bin/mkdir -p $1
|
||||
return
|
||||
fi
|
||||
if hp9000s300 > /dev/null 2>&1 || hp9000s800 > /dev/null 2>&1; then
|
||||
mkdir -p $1
|
||||
return
|
||||
fi
|
||||
|
||||
#
|
||||
# We can't use mkdir -p so do the hard way.
|
||||
# starting at the root check/create all the directories
|
||||
# in the given path
|
||||
#
|
||||
|
||||
typeset xdirs=""
|
||||
typeset nextdir=""
|
||||
typeset fulldirs
|
||||
|
||||
# provide extra slash for apollo systems (//hp* syntax)?
|
||||
|
||||
if [ "$1" = "${1##/}" ]; then
|
||||
# not a full path name so attach path to current directory
|
||||
fulldirs=`/bin/pwd`/$1
|
||||
xdirs="/" # added to support apollo "//host" syntax
|
||||
elif [ "$1" != "${1##//}" ]; then
|
||||
# using "//host" syntax
|
||||
fulldirs=$1
|
||||
xdirs="/"
|
||||
else
|
||||
fulldirs=$1
|
||||
xdirs=""
|
||||
fi
|
||||
|
||||
echo creating path: $1
|
||||
|
||||
while nextdir=`expr /$fulldirs/ : '/*\([^/]*\)/.*'`; do
|
||||
xdirs=$xdirs/$nextdir
|
||||
if [ ! -d $xdirs ]; then
|
||||
mkdir $xdirs
|
||||
fi
|
||||
|
||||
fulldirs=`expr $fulldirs : '/*[^/]*/\(.*\)'`
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
# doit
|
||||
# function to put the source file into the product tree. This function
|
||||
# reads its stdin for file movement rules.
|
||||
#
|
||||
doit()
|
||||
{
|
||||
if [ $# -ne 0 ]; then
|
||||
echo "ERROR: \"$0\" incorrect arg count" >&2
|
||||
echo "ARGS: $@" >&2
|
||||
fi
|
||||
|
||||
typeset TYPE
|
||||
typeset RULE
|
||||
typeset SRC
|
||||
typeset DEST
|
||||
typeset MODE
|
||||
typeset OWNER
|
||||
typeset GROUP
|
||||
|
||||
while read TYPE RULE SRC DEST MODE OWNER GROUP; do
|
||||
# ignore blank lines
|
||||
if [ -z "$TYPE" ]; then
|
||||
continue;
|
||||
fi
|
||||
# ignore comment lines (match longest string starting with '#')
|
||||
if [ "${TYPE###}" != "$TYPE" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
DEST=$DESTTREE/$FILESET${DEST}
|
||||
CMD=""
|
||||
|
||||
case $TYPE in
|
||||
directory)
|
||||
if [ ! -d "$DEST" ]; then
|
||||
CMD="createPath $DEST"
|
||||
fi
|
||||
;;
|
||||
file)
|
||||
SRC=$SRCTREE/$SRC
|
||||
if [ "$CHECK_BEFORE" = "yes" ]
|
||||
then
|
||||
if [ ! -f $SRC ]
|
||||
then
|
||||
echo "Missing: $SRC"
|
||||
echo "Missing: $SRC" >>/tmp/mkprod.missing
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
if [ ! -f $SRC ]; then
|
||||
echo "ERROR: Cannot read \"$SRC\"." >&2
|
||||
echo " LINE=$TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP " >&2
|
||||
continue
|
||||
fi
|
||||
case $RULE in
|
||||
c-) # compress rule
|
||||
CMD="compress -c $SRC > $DEST"
|
||||
;;
|
||||
-n) # nroff rule (for apollo man pages)
|
||||
if egrep -c '^\.TH[ ]|^\.ds[ ]' $SRC > /dev/null ; then
|
||||
CMD="tbl $SRC|eqn|nroff -man|col -b> $DEST"
|
||||
else
|
||||
CMD="cp $SRC $DEST"
|
||||
fi
|
||||
;;
|
||||
-s) # strip rule
|
||||
# Domain Only
|
||||
# if [ "$(find $SRC -typeuid coff -print)" = "$SRC" ]; then
|
||||
# hp-ux
|
||||
if [ -z "$STRIP" ]; then
|
||||
CMD="cp $SRC $DEST"
|
||||
else if file $SRC | grep -q "not stripped"; then
|
||||
CMD="cp $SRC $DEST; strip $DEST"
|
||||
else
|
||||
CMD="cp $SRC $DEST"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
--) # default (no special processing)
|
||||
CMD="cp $SRC $DEST"
|
||||
;;
|
||||
*) # huh?
|
||||
echo "ERROR: Unrecognized rule: \"$RULE\"" >&2
|
||||
echo " LINE=$TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP " >&2
|
||||
continue;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sym_link)
|
||||
if [ -z "$SRC" ]; then
|
||||
echo "ERROR: No link source for \"$DEST\"" >&2
|
||||
echo " LINE=$TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP " >&2
|
||||
continue;
|
||||
fi
|
||||
if [ "${SRC#\`node_data}" != "$SRC" ]; then
|
||||
# apollo-style special link
|
||||
echo "WARNING: encountered special link: $SRC" >&2
|
||||
# try to make link to this SRC by adding a
|
||||
# backslash to protect the tic mark.
|
||||
SRC=\\$SRC
|
||||
elif [ "${SRC#/}" = "$SRC" ]; then
|
||||
# echo "ERROR: Relative link \"$SRC\"" >&2
|
||||
# echo "WARNING: Relative link \"$SRC\"" >&2
|
||||
# echo " LINE=$TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP " >&2
|
||||
# Protect the potential variant link variable
|
||||
# (eg lnk_$(LNK))
|
||||
SRC=\'$SRC\'
|
||||
# continue;
|
||||
fi
|
||||
CMD="ln -s $SRC $DEST"
|
||||
# Remove existing link if one already exists
|
||||
[ -${LNKTST} "$DEST" ] && rm $DEST
|
||||
;;
|
||||
hard_link)
|
||||
# Hard links are assumed to be made only to other
|
||||
# files in the submittal -- not to existing system
|
||||
# files.
|
||||
SRC="$DESTTREE/$FILESET${SRC}"
|
||||
if [ -z "$SRC" ]; then
|
||||
echo "ERROR: No link source for \"$DEST\"" >&2
|
||||
echo " LINE=$TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP" >&2
|
||||
continue;
|
||||
fi
|
||||
CMD="ln $SRC $DEST"
|
||||
;;
|
||||
*) echo "ERROR: Unrecognized type: \"$TYPE\"" >&2
|
||||
echo " LINE=$TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP" >&2
|
||||
continue;
|
||||
;;
|
||||
esac
|
||||
|
||||
# createPath issues its own error messages
|
||||
if [ ! -d ${DEST%/*} ]; then
|
||||
createPath ${DEST%/*} || continue
|
||||
fi
|
||||
[ -z "$CMD" ] && continue
|
||||
eval "$CMD" || {
|
||||
echo "ERROR: \"$CMD\" failed" >&2
|
||||
echo " LINE=$TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP" >&2;
|
||||
continue;
|
||||
}
|
||||
# set permissions for non-links
|
||||
if [ "${TYPE%link}" = "$TYPE" ]; then
|
||||
if [ "$USER" = "root" ]; then
|
||||
chmod $MODE $DEST ||
|
||||
echo "ERROR: \"chmod $MODE $DEST\" failed" >&2
|
||||
chgrp $GROUP $DEST ||
|
||||
echo "ERROR: \"chgrp $GROUP $DEST\" failed" >&2
|
||||
chown $OWNER $DEST ||
|
||||
echo "ERROR: \"chown $OWNER $DEST\" failed" >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $TYPE $RULE $SRC $DEST $MODE $OWNER $GROUP
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
###################################################
|
||||
# MAIN BODY
|
||||
###################################################
|
||||
|
||||
#
|
||||
# Check Path for chmod, chown, and chgrp
|
||||
#
|
||||
whence chmod > /dev/null || {
|
||||
echo "ERROR: \"chmod\" not in PATH." >&2
|
||||
exit 1
|
||||
}
|
||||
whence chown > /dev/null || {
|
||||
echo "ERROR: \"chown\" not in PATH." >&2
|
||||
exit 1
|
||||
}
|
||||
whence chgrp > /dev/null || {
|
||||
echo "ERROR: \"chgrp\" not in PATH." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
CHECK_BEFORE="no"
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
case $1 in
|
||||
-f*)
|
||||
FILESET=${1#-f}
|
||||
if [ -z "$FILESET" ]; then
|
||||
if [ $# -ge 1 ]; then
|
||||
shift;
|
||||
FILESET=$1
|
||||
else
|
||||
echo $Usage
|
||||
exit 1;
|
||||
fi
|
||||
fi;;
|
||||
-S*) SRCTREE=${1#-S}
|
||||
if [ -z "$SRCTREE" ]; then
|
||||
if [ $# -ge 1 ]; then
|
||||
shift;
|
||||
SRCTREE=$1
|
||||
else
|
||||
echo $Usage
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-D*) DESTTREE=${1#-D}
|
||||
if [ -z "$DESTTREE" ]; then
|
||||
if [ $# -ge 1 ]; then
|
||||
shift;
|
||||
DESTTREE=$1
|
||||
else
|
||||
echo $Usage
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
-P*) CHECK_BEFORE="yes"
|
||||
;;
|
||||
|
||||
*) files="$files $1";;
|
||||
esac
|
||||
if [ $# -ge 1 ]; then
|
||||
shift;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$files" -o -z "$SRCTREE" ]; then
|
||||
echo $Usage >&2
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ ! -d "$SRCTREE" ]; then
|
||||
echo "ERROR: Cannot access \"$SRCTREE\"." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$DESTTREE" ]; then
|
||||
echo "ERROR: Cannot access \"$DESTTREE\"." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
umask 022
|
||||
if [ -f /com/ctnode ]; then
|
||||
#
|
||||
# Make sure berkely style permissions are applied to the product tree
|
||||
# This should cause directories to be created with permissions based
|
||||
# on the umask (which is otherwise ignored on "open security model"
|
||||
# file systems).
|
||||
#
|
||||
chacl -RB $DESTTREE
|
||||
fi
|
||||
|
||||
# Debug Stmts
|
||||
echo FILESET=$FILESET
|
||||
echo files=$files
|
||||
echo SRCTREE=$SRCTREE
|
||||
echo DESTTREE=$DESTTREE
|
||||
echo "#-------------- $(date) --------------"
|
||||
echo ""
|
||||
|
||||
TOOL_DIR=$SRCTREE/admin/IntegTools/dbTools
|
||||
|
||||
#
|
||||
# Avoid making duplicate entries
|
||||
# make sure links are referred to AFTER the files to which they point.
|
||||
#
|
||||
if [ $PLATFORM = "uxp" ]; then
|
||||
$TOOL_DIR/uncomment $files | sort | uniq | $TOOL_DIR/linksLast - > /tmp/awk.in
|
||||
cat /tmp/awk.in | awkit > /tmp/awk.out
|
||||
cat /tmp/awk.out | doit
|
||||
else
|
||||
$TOOL_DIR/uncomment $files | sort | uniq | $TOOL_DIR/linksLast - | awkit | doit
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "#-------------- $(date) --------------"
|
||||
765
cde/admin/IntegTools/dbTools/udbParseLib.awk
Normal file
765
cde/admin/IntegTools/dbTools/udbParseLib.awk
Normal file
|
|
@ -0,0 +1,765 @@
|
|||
|
||||
# Awk Library file for parsing UDB files
|
||||
#
|
||||
function parseUdb() {
|
||||
# nawk has already read the initial line.
|
||||
# Tokenize it before doing anything else.
|
||||
tokenize()
|
||||
readDefaults(defaults)
|
||||
# assign hp-ux ".db" file src and link defaults
|
||||
# if none were designated.
|
||||
if ( SrcDefault == "" )
|
||||
SrcDefault = "a_out_location"
|
||||
if ( LnkDefault == "" )
|
||||
LnkDefault = "link_source"
|
||||
if ( TypDefault == "" )
|
||||
TypDefault = "type"
|
||||
if ( DestDefault == "" )
|
||||
DestDefault = "install_target"
|
||||
if ( ModeDefault == "" )
|
||||
ModeDefault = "mode"
|
||||
if ( OwnerDefault == "" )
|
||||
OwnerDefault = "owner"
|
||||
if ( GroupDefault == "" )
|
||||
GroupDefault = "group"
|
||||
readData()
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# readDefaults
|
||||
# This routine reads the defaults at the front section
|
||||
# of the universal database and salts the defaults away.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function readDefaults(dflts)
|
||||
{
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function readDefaults" > DeBugFile
|
||||
}
|
||||
do {
|
||||
os = getOS()
|
||||
if ( osQual != "defaults" )
|
||||
syntaxError("No defaults for: " BlockToken)
|
||||
if ( os == BlockToken || os == "default" )
|
||||
break
|
||||
skipToToken("}")
|
||||
} while ( 1 )
|
||||
fillDefaults()
|
||||
if ( DeBug > 1 )
|
||||
print "Skipping remaining defaults" > DeBugFile
|
||||
# skip remaining default specs
|
||||
while ( lookAhead() == "{" ) {
|
||||
# This should be another default spec
|
||||
# skip it. (watch out for syntax errors)
|
||||
os = getOS()
|
||||
if ( osQual != "defaults" )
|
||||
syntaxError("Expected os:defaults found: \"" os ":" osQual "\"")
|
||||
if ( os == BlockToken && fileName == FILENAME )
|
||||
syntaxError("Only one \"defaults\" record allowed per os" )
|
||||
|
||||
skipToToken("}");
|
||||
}
|
||||
if ( DeBug > 0 ) Depth--
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# syntaxError
|
||||
# bail out
|
||||
#
|
||||
# (optionally) mail a message to an administrator if a syntax
|
||||
# error occurs in a database.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function syntaxError(reason) {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function syntaxError:" > DeBugFile
|
||||
}
|
||||
print "Syntax ERROR line: " NR " of file: " FILENAME
|
||||
if (reason)
|
||||
print " " reason
|
||||
system( "rm -f /tmp/SyntaxError" )
|
||||
system( "touch /tmp/SyntaxError" )
|
||||
print "Syntax ERROR line: " NR " of file: " FILENAME > "/tmp/SyntaxError"
|
||||
if (reason)
|
||||
print " " reason >> "/tmp/SyntaxError"
|
||||
close( "/tmp/SyntaxError" )
|
||||
if ( mailTo != "" ) {
|
||||
system( "mailx -s \"database syntax error\" "mailTo" < /tmp/SyntaxError" )
|
||||
}
|
||||
system( "rm -f /tmp/SyntaxError" )
|
||||
exit 1
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# fillDefaults
|
||||
# This routine reads the defaults in the OS
|
||||
# defaults section of the database. It saves the defaults
|
||||
# in the "defaults" awk-style string array.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function fillDefaults() {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function fillDefaults:" > DeBugFile
|
||||
}
|
||||
tempDflt = ""
|
||||
NumEntries = 1
|
||||
do {
|
||||
if ( tempDflt != "" ) {
|
||||
keyword = tempDflt
|
||||
tempDflt = ""
|
||||
}
|
||||
else
|
||||
keyword = nextToken()
|
||||
|
||||
if ( keyword == "}" )
|
||||
break;
|
||||
if ( "=" != nextToken())
|
||||
syntaxError("Keyword: " keyword " not followed by \"=\" ");
|
||||
tempDflt = nextToken();
|
||||
if ( lookAhead() == "=" )
|
||||
defaults[keyword]=""
|
||||
else {
|
||||
if ( tempDflt == "<SRC>" ) {
|
||||
SrcDefault = keyword;
|
||||
tempDflt = ""
|
||||
}
|
||||
if ( tempDflt == "<LNK>" ) {
|
||||
LnkDefault = keyword;
|
||||
tempDflt = ""
|
||||
}
|
||||
if ( tempDflt == "<TYPE>" ) {
|
||||
TypDefault = keyword;
|
||||
tempDflt = "file"
|
||||
}
|
||||
if ( tempDflt == "<DEST>" ) {
|
||||
DestDefault = keyword;
|
||||
tempDflt = ""
|
||||
}
|
||||
if ( tempDflt == "<MODE>" ) {
|
||||
ModeDefault = keyword;
|
||||
tempDflt = "0444"
|
||||
}
|
||||
if ( tempDflt == "<OWNER>" ) {
|
||||
OwnerDefault = keyword;
|
||||
tempDflt = "bin"
|
||||
}
|
||||
if ( tempDflt == "<GROUP>" ) {
|
||||
GroupDefault = keyword;
|
||||
tempDflt = "bin"
|
||||
}
|
||||
defaults[keyword]= tempDflt
|
||||
|
||||
tempDflt = ""
|
||||
}
|
||||
defOrder[NumEntries++] = keyword;
|
||||
} while ( 1 )
|
||||
if ( DeBug > 3 ) {
|
||||
DBGprintArray(defaults,"defaults")
|
||||
print "SrcDefault =" SrcDefault > DeBugFile
|
||||
print "LnkDefault =" LnkDefault > DeBugFile
|
||||
print "TypDefault =" TypDefault > DeBugFile
|
||||
}
|
||||
if ( DeBug > 0 ) Depth--
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# getOS
|
||||
# This routine scans the database for an
|
||||
# open brace, then a token, then a ":" indicating
|
||||
# the start of an OS defaults section.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function getOS()
|
||||
{
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function getOS:" > DeBugFile
|
||||
}
|
||||
osQual = ""
|
||||
gotOS = 0
|
||||
|
||||
if ( "{" != nextToken() )
|
||||
syntaxError("Missing initial {")
|
||||
os = nextToken();
|
||||
if ( lookAhead() == ":" ) {
|
||||
nextToken();
|
||||
osQual= nextToken();
|
||||
} else
|
||||
osQual= ""
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return os
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# nextToken
|
||||
# parse the incoming data stream into tokens.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function nextToken() {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function nextToken:" > DeBugFile
|
||||
}
|
||||
if ( EOF_Reached == 1 )
|
||||
syntaxError("Premature EOF");
|
||||
tmpToken=tokens[TK++]
|
||||
while ( TK > Ntokens || tokens[TK] == ";" ) {
|
||||
TK++
|
||||
if ( TK > Ntokens )
|
||||
if ( newLine() <= 0 ) {
|
||||
EOF_Reached = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( DeBug > 2 )
|
||||
print "Returning token: " tmpToken > DeBugFile
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return tmpToken
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# lookAhead
|
||||
# return the token at the head of the current list of
|
||||
# tokens, but do not bump the token count in TK
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function lookAhead() {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function lookAhead" > DeBugFile
|
||||
}
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return tokens[TK];
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# newLine, tokenize
|
||||
# read a new line of input and tokenize it.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function newLine() {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function newLine:" > DeBugFile
|
||||
}
|
||||
if ( (retval = getline) <= 0 ) {
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return retval
|
||||
}
|
||||
retval = tokenize()
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return retval
|
||||
}
|
||||
function tokenize() {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function tokenize:" > DeBugFile
|
||||
}
|
||||
# Skip blank/comment lines
|
||||
while ( NF == 0 || $0 ~ /^[ ]*#/ ) {
|
||||
if ( (getline) <= 0 ) {
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Make sure syntactically meaningful characters are surrounded by
|
||||
# white space. (I gave up on gsub for this purpose).
|
||||
#
|
||||
last=1
|
||||
Str="" # temp string for modified input line
|
||||
tstStr=$0 # part of input line being tested
|
||||
newStr=$0 # current input line image with modifications
|
||||
##########################################################################
|
||||
# REPLACE THE FOLLOWING LINE WITH A WORK_AROUND FOR A PROBLEM WITH
|
||||
# THE MATCH FUNCTION FOR THE SUN VERSION OF "nawk"
|
||||
#
|
||||
# while ( match(tstStr,"[^\\\][:=}{;]") ) {
|
||||
#
|
||||
while ( match(tstStr,"[:=}{;]") ) {
|
||||
if ( RSTART-1 > 0 && substr(tstStr,RSTART-1,1) != "\\") {
|
||||
RSTART=RSTART-1
|
||||
LENGTH=LENGTH+1
|
||||
} else {
|
||||
#
|
||||
# The character was escaped with a backslash.
|
||||
# Patch things up -- continue testing the rest
|
||||
# of the line.
|
||||
#
|
||||
Str=Str substr($0,last,RSTART+1)
|
||||
last = last + RSTART + 1
|
||||
tstStr =substr($0,last)
|
||||
newStr = Str tstStr
|
||||
continue;
|
||||
}
|
||||
####################### end of workaround ################################
|
||||
############################################################################
|
||||
if ( DeBug > 1 ) {
|
||||
print "Tokenize: Match found in: " tstStr
|
||||
print "RSTART= " RSTART " ; RLENGTH = " RLENGTH
|
||||
}
|
||||
# match found --
|
||||
# the temp string is now modified to contain:
|
||||
# 1) all characters up to the match and the first char of match
|
||||
# 2) blank before the syntactically significant char
|
||||
# 3) the significant character
|
||||
# 4) blank following the significant character
|
||||
|
||||
Str=Str substr($0,last,RSTART) " " substr($0,last+RSTART,1) " "
|
||||
last = last + RSTART + 1;
|
||||
#
|
||||
# Test remaining part of input line for additional occurances
|
||||
# of syntactically significant characters.
|
||||
#
|
||||
tstStr=substr($0,last)
|
||||
#
|
||||
# Our best guess for the new string is the part of the
|
||||
# input line already tested plus the part yet to be tested.
|
||||
#
|
||||
newStr=Str tstStr
|
||||
}
|
||||
#
|
||||
# Check for any instances of syntax chars at the start of the line
|
||||
#
|
||||
sub("^[:=}{;]","& ",newStr);
|
||||
$0 = newStr
|
||||
|
||||
#
|
||||
# allow escaping of significant syntax characters
|
||||
#
|
||||
gsub("[\\\][{]","{")
|
||||
gsub("\\\:",":")
|
||||
gsub("\\\;",";")
|
||||
gsub("\\\=","=")
|
||||
gsub("[\\\][}]","}")
|
||||
|
||||
#
|
||||
# Having insured that interesting chars are surrounded by blanks
|
||||
# now tokenize the input line.
|
||||
#
|
||||
|
||||
Ntokens = split($0,tokens)
|
||||
TK = 1
|
||||
if ( DeBug > 3 )
|
||||
DBGprintTokens()
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return Ntokens
|
||||
}
|
||||
function DBGprintTokens()
|
||||
{
|
||||
for ( i = 1; i <= Ntokens ; i++ )
|
||||
print "tokens[" i "] = " tokens[i] > DeBugFile
|
||||
return 0
|
||||
}
|
||||
function DBGprintArray(array,name) {
|
||||
for ( i in array) {
|
||||
print name "[" i "] = " array[i] > DeBugFile
|
||||
}
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# skipToToken
|
||||
# read until the passed in token is encountered
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function skipToToken(tok)
|
||||
{
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function skipToToken:" > DeBugFile
|
||||
}
|
||||
while ( nextToken() != tok )
|
||||
;
|
||||
if ( DeBug > 0 ) Depth--
|
||||
}
|
||||
# -------------------------------------------------------------
|
||||
# readData
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function readData() {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function readData" > DeBugFile
|
||||
}
|
||||
while ( EOF_Reached == 0 ) {
|
||||
if ( fileName != FILENAME ) {
|
||||
if ( DeBug > 1 ) {
|
||||
print "====>Files Changed" > DeBugFile
|
||||
print "fileName= " fileName > DeBugFile
|
||||
print "FILENAME= " FILENAME > DeBugFile
|
||||
}
|
||||
fileName = FILENAME
|
||||
# skip over defaults section of the new file
|
||||
while ( lookAhead() == "{" ) {
|
||||
# This should be another default spec
|
||||
# skip it. (watch out for syntax errors)
|
||||
os = getOS()
|
||||
if ( osQual != "defaults" )
|
||||
syntaxError("Expected os:defaults found: \"" os ":" osQual "\"")
|
||||
#
|
||||
# Relax this restriction since we are
|
||||
# ignoring this defaults record
|
||||
#if ( os == BlockToken )
|
||||
# syntaxError("Only one \"defaults\" record allowed per os" )
|
||||
|
||||
skipToToken("}");
|
||||
}
|
||||
}
|
||||
if ( getNextRecord(record) > 0 )
|
||||
PRTREC(record);
|
||||
# skip remaining os entries for this source
|
||||
# sorry no error checking.
|
||||
while ( EOF_Reached == 0 && lookAhead() == "{" )
|
||||
skipToToken("}")
|
||||
if ( DeBug > 1 )
|
||||
print "EOF_Reached = " EOF_Reached > DeBugFile
|
||||
}
|
||||
if ( DeBug > 0 ) Depth--
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# getNextRecord
|
||||
#
|
||||
# this function fills the rec[] array with defaults
|
||||
#
|
||||
# then it scans for a block that has a token maching
|
||||
# BlockToken, or accepts a block with the "default"
|
||||
# token. The "default" token is not accepted if
|
||||
# defaults are disallowed.
|
||||
#
|
||||
# finally fillRecord is called to read in the lines
|
||||
# in the block and override the entries in the rec[] array.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
function getNextRecord(rec) {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering function getNextRecord:" > DeBugFile
|
||||
}
|
||||
# fill with defaults
|
||||
for ( i in defaults )
|
||||
rec[i] = defaults[i];
|
||||
do {
|
||||
src = nextToken()
|
||||
if ( DeBug > 2 )
|
||||
print "src=" src > DeBugFile
|
||||
# Allow special characters to appear in src names if they have been backslashed
|
||||
# if ( src ~ /[{:=}]/ )
|
||||
# syntaxError("Invalid source: \"" src "\"");
|
||||
do {
|
||||
os = getOS()
|
||||
if ( DeBug > 1 ) {
|
||||
print "Got os " os " and qual= " osQual > DeBugFile
|
||||
print "NR= " NR " : " $0 > DeBugFile
|
||||
}
|
||||
if (( os != BlockToken || osQual == "not" ) \
|
||||
&& ( os != "default" || UseDefaultBlocks != "Y" ) ) {
|
||||
|
||||
if ( DeBug > 2)
|
||||
print "Skipping to end of os rec" > DeBugFile
|
||||
skipToToken("}");
|
||||
}
|
||||
if ( EOF_Reached == 1 || fileName != FILENAME ){
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return 0
|
||||
}
|
||||
if ( DeBug > 2 )
|
||||
print "Look Ahead is: " tokens[TK] > DeBugFile
|
||||
} while ( lookAhead() == "{" )
|
||||
} while (( os != BlockToken ) && ( os != "default" || UseDefaultBlocks != "Y"))
|
||||
if ( DeBug > 2)
|
||||
print "About to call fillRecord" > DeBugFile
|
||||
fillRecord(rec)
|
||||
if ( DeBug > 0 ) Depth--
|
||||
return 1
|
||||
}
|
||||
function fillRecord(rec) {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering fillRecord:" > DeBugFile
|
||||
}
|
||||
tempEntry = ""
|
||||
do {
|
||||
if ( tempEntry != "" ) {
|
||||
keyword = tempEntry;
|
||||
tempEntry = ""
|
||||
} else
|
||||
keyword = nextToken();
|
||||
if ( keyword == "}" )
|
||||
break;
|
||||
if ( "=" != nextToken())
|
||||
syntaxError("Keyword: " keyword " not followed by \"=\"");
|
||||
tempEntry = nextToken();
|
||||
if ( lookAhead() == "=" )
|
||||
rec[keyword] = ""
|
||||
else {
|
||||
rec[keyword] = tempEntry
|
||||
tempEntry = ""
|
||||
}
|
||||
} while (1)
|
||||
#
|
||||
# check for source entry
|
||||
# THIS IMPLIES KNOWLEDGE OF .db FILE ENTRIES!!
|
||||
if ( DeBug > 2)
|
||||
print "TYPE= " rec[TypDefault] > DeBugFile
|
||||
if ( src == "-" )
|
||||
if ( rec[TypDefault]=="directory" || rec[TypDefault]=="empty_dir")
|
||||
{
|
||||
# no source required for a directory
|
||||
if ( rec[SrcDefault] != "" )
|
||||
syntaxError(SrcDefault " \"" rec[SrcDefault] "\" specified for a directory.")
|
||||
if ( rec[LnkDefault] != "" )
|
||||
syntaxError(LnkDefault " \"" rec[LnkDefault] "\" specfied for a directory.")
|
||||
|
||||
rec[SrcDefault] = src;
|
||||
} else if ( rec["status"] == "---cu-" ) {
|
||||
# This is used for some reason (X11-SERV.db)
|
||||
if ( rec[SrcDefault] != "" )
|
||||
syntaxError( "File: \"" rec["install_target"] "\" with special status: \"---cu-\" should have no source.");
|
||||
} else
|
||||
syntaxError("Invalid source: \"" src "\" for type: \"" rec[TypDefault] )
|
||||
else if ( rec[TypDefault] ~ /link/ )
|
||||
if ( src ~ /^\// || src ~ /^\./ ) {
|
||||
if ( rec[SrcDefault] != "")
|
||||
syntaxError( SrcDefault ": \"" rec[SrcDefault] "\" specified for link: \"" src "\"")
|
||||
if ( rec[LnkDefault] == "" )
|
||||
rec[LnkDefault]=src;
|
||||
} else
|
||||
syntaxError("Invalid source: \"" src "\" for type: \"" rec[TypDefault] "\"")
|
||||
else if ( rec[TypDefault] == "file" || rec[TypDefault] == "control" )
|
||||
rec[SrcDefault] = src;
|
||||
else
|
||||
syntaxError("Unrecognized type:\"" rec[TypDefault] "\"")
|
||||
|
||||
if ( DeBug > 0 ) Depth--
|
||||
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# printDB
|
||||
# Print records in ".db" format
|
||||
# -------------------------------------------------------------
|
||||
function printDb(rec) {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering printDb:" > DeBugFile
|
||||
}
|
||||
# NumEntries should be one greater than the number of defaults
|
||||
# read in.
|
||||
for ( i = 1; i< NumEntries; i++ ) {
|
||||
printf("%-40s %s %s\n",defOrder[i], ":",rec[defOrder[i]])
|
||||
}
|
||||
print "#"
|
||||
if ( DeBug > 0 ) Depth--
|
||||
}
|
||||
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# printLst
|
||||
# Print records in ".lst" format
|
||||
# -------------------------------------------------------------
|
||||
function printLst(rec) {
|
||||
if ( DeBug > 0 ) {
|
||||
Depth++
|
||||
for ( i=1; i < Depth; i++ )
|
||||
printf(" ") > DeBugFile
|
||||
print "Entering printLst:" > DeBugFile
|
||||
}
|
||||
if ( rec[TypDefault] ~ /link/ )
|
||||
Source = LnkDefault
|
||||
else
|
||||
Source = SrcDefault
|
||||
|
||||
printf("%s %s %s %s %s %s %s %s %s\n",
|
||||
rec[ DestDefault],
|
||||
rec[ ModeDefault ],
|
||||
rec[ Source ],
|
||||
rec[ TypDefault ],
|
||||
rec[ OwnerDefault ],
|
||||
rec[ GroupDefault ],
|
||||
rec[ "status" ],
|
||||
rec[ "processor" ],
|
||||
rec[ "responsible_project" ] )
|
||||
|
||||
if ( DeBug > 0 ) Depth--
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# printGather
|
||||
# print records in one of the formats expected by Gather.ksh
|
||||
# (Jim Andreas print routine).
|
||||
# -------------------------------------------------------------
|
||||
function printGather(rec) {
|
||||
# print "Entering printRecord: "
|
||||
|
||||
if (( BlockToken == "hp-ux" ) && ( rec[ "processor" ] != "378" ))
|
||||
{
|
||||
if ( index( rec[ "processor" ], Machine ) == 0 )
|
||||
{
|
||||
#printf( "skipping %s, Machine %s machines %s\n", src, Machine, rec[ "processor" ] );
|
||||
return
|
||||
}
|
||||
}
|
||||
if ( action == "toSDD" )
|
||||
{
|
||||
if ( rec[ "type" ] == "file" )
|
||||
{
|
||||
printf("%s:F:%s:%s:%s:*::\n",
|
||||
rec[ "install_target" ], rec[ "owner" ],
|
||||
rec[ "group" ], rec[ "mode" ])
|
||||
}
|
||||
}
|
||||
else if ( action == "toReleaseTree" )
|
||||
{
|
||||
if ( ( rec[ "type" ] == "hard_link" ) ||
|
||||
( rec[ "type" ] == "sym_link" ) ||
|
||||
( rec[ "type" ] == "file" ) )
|
||||
{
|
||||
|
||||
#
|
||||
# if this is a link, then fudge a source file for Gather.ksh
|
||||
# to check on. Really we are linking two dest files together
|
||||
# so the hack is to get around the check in Gather.ksh
|
||||
#
|
||||
|
||||
if ( ( rec[ "type" ] == "hard_link" ) ||
|
||||
( rec[ "type" ] == "sym_link" ) )
|
||||
{
|
||||
printf( " {s}%s {d}%s\n", "-", rec[ "install_target" ] );
|
||||
}
|
||||
else if ( length( src ) > 34 )
|
||||
printf( " {s}%s {d}%s\n", src, rec[ "install_target" ] );
|
||||
else
|
||||
printf( " {s}%-34s {d}%s\n", src, rec[ "install_target" ] );
|
||||
|
||||
if ( rec[ "install_rule_name" ] == "c-" )
|
||||
{
|
||||
printf( "compress -c < {s}%s > {d}%s\n", src,
|
||||
rec[ "install_target" ] );
|
||||
}
|
||||
else if ( rec[ "type" ] == "sym_link" )
|
||||
{
|
||||
printf( "ln -s %s {d}%s\n", src,
|
||||
rec[ "install_target" ] );
|
||||
}
|
||||
else if ( rec[ "type" ] == "hard_link" )
|
||||
{
|
||||
printf( "ln {d}%s {d}%s\n", src,
|
||||
rec[ "install_target" ] );
|
||||
}
|
||||
else if ( rec[ "uncompress" ] == "true" )
|
||||
{
|
||||
printf( "uncompress -c < {s}%s > {d}%s\n", src,
|
||||
rec[ "install_target" ] );
|
||||
}
|
||||
else if ( length( src ) > 34 )
|
||||
{
|
||||
printf( "cp {s}%s {d}%s\n", src,
|
||||
rec[ "install_target" ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "cp {s}%-34s {d}%s\n", src,
|
||||
rec[ "install_target" ] );
|
||||
}
|
||||
printf( "%s %s %s\n", rec[ "owner" ], rec[ "group" ], rec[ "mode" ])
|
||||
rec[ "install_rule_name" ] = "";
|
||||
rec[ "uncompress" ] = "";
|
||||
}
|
||||
}
|
||||
else if ( action == "toDeliverArgs" )
|
||||
{
|
||||
temp = rec[ "install_target" ];
|
||||
m = n = index( temp, "/" );
|
||||
while ( n != 0 )
|
||||
{
|
||||
temp = substr( temp, n+1 );
|
||||
n = index( temp, "/" );
|
||||
m += n;
|
||||
}
|
||||
dirnametarget = substr( rec[ "install_target" ], 1, m-1 );
|
||||
|
||||
if ( length( rec[ "install_target" ] ) > 40 )
|
||||
{
|
||||
printf("%s -d .%s\n", rec[ "install_target" ], dirnametarget );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%-40s -d .%s\n", rec[ "install_target" ], dirnametarget );
|
||||
}
|
||||
}
|
||||
else if ( action == "toCheckBuild" )
|
||||
{
|
||||
# print "Entering printRecord - toCheckBuild: "
|
||||
#
|
||||
# skip any link info
|
||||
#
|
||||
if ( rec[ "type" ] == "file" )
|
||||
{
|
||||
#
|
||||
# just print the source path for the checker tool
|
||||
#
|
||||
printf("%s\n", src );
|
||||
}
|
||||
}
|
||||
else if ( action == "toFileList" )
|
||||
{
|
||||
#
|
||||
# skip any link info
|
||||
#
|
||||
if ( rec[ "type" ] == "file" )
|
||||
{
|
||||
#
|
||||
# print the source and install_target for the human person
|
||||
#
|
||||
if ( length( src ) > 40 || length( rec[ "install_target" ] ) > 40 )
|
||||
{
|
||||
printf("%s -> %s %s\n", src,
|
||||
rec[ "install_target" ], rec[ "mode" ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%-40s -> %-40s %s\n", src,
|
||||
rec[ "install_target" ], rec[ "mode" ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( action == "toTargetList" )
|
||||
{
|
||||
#
|
||||
# skip any link info
|
||||
#
|
||||
if ( rec[ "type" ] == "file" )
|
||||
{
|
||||
#
|
||||
# just print the install_target
|
||||
#
|
||||
printf("%s\n", rec[ "install_target" ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
437
cde/admin/IntegTools/dbTools/udbToAny.ksh
Executable file
437
cde/admin/IntegTools/dbTools/udbToAny.ksh
Executable file
|
|
@ -0,0 +1,437 @@
|
|||
#!/bin/ksh
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# udbToAny.ksh
|
||||
#
|
||||
# This script was leveraged from "databaseConversionTool.ksh"
|
||||
# it should provide a superset of the functionality of that script;
|
||||
# however the primary motivation was to get away from the use of
|
||||
# multiple divergent parsers for the ".udb" style database. The
|
||||
# parser has been moved into an awk "library" file: udbParseLib.awk.
|
||||
# this parser can and should be used by all scripts wishing to parse
|
||||
# the ".udb" data bases.
|
||||
#
|
||||
# ----------------------------
|
||||
# new features:
|
||||
#
|
||||
# -toDB to convert to old mksubmit-style ".db" format
|
||||
# -toLst to convert to old domain-port-style ".lst" files
|
||||
# -toCustom <prt> to specify a print routine for a custom format
|
||||
# -custom <awklib> to specify a library containing custom print routines.
|
||||
# -udbParseLib <awkLib> to specify a library containing an alternate parser.
|
||||
# -mailTo <user> to specify an administrator who will receive mail
|
||||
# concerning parsing errors.
|
||||
#
|
||||
# -Database is now obsolete (although it will still work)
|
||||
# <udbfile> ... ... The script can now take multiple udb files (Only the
|
||||
# defaults specified in the first udb file will apply).
|
||||
#
|
||||
# ----------------------------
|
||||
#
|
||||
# This script converts a universal database to an
|
||||
# HP OSF style System Definition Database (SDD) file,
|
||||
# or a set of args suitable to supply to the Chelmsford deliver
|
||||
# tool, or a set of commands to build a delivery tree.
|
||||
# For more details, please refer to the "X11 and VUE for HP_OSF/1.0"
|
||||
# document.
|
||||
#
|
||||
# This script was leveraged (read hacked extensively) from
|
||||
# the "udbToDb" script by Jim Andreas. Ron Voll authored the
|
||||
# original "udbToDb" script.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
|
||||
# usage: databaseToSDD.ksh Option udbFile
|
||||
#
|
||||
# where Option is one of the following:
|
||||
#
|
||||
# -toDB convert a .udb to ".db" format
|
||||
# -toLst convert a .udb to ".lst" format
|
||||
# -toSDD convert a .udb to SDD format
|
||||
# -toDeliverArgs convert a .udb to args that the deliver tool likes
|
||||
# -toReleaseTree convert a .udb to a script to build a delivery tree
|
||||
# -toCheckBuild convert a .udb to a script to check the items in a build
|
||||
# -toFileList convert a .udb to a list of files for carbon units
|
||||
# -Machine specifies 3,7,8 for hp-ux releases
|
||||
# -ReleaseStream {hp-ux, osf, whatever}
|
||||
# -NoDefaults do not convert any records labeled default
|
||||
# -toTargetList convert a .udb to a list of target files in product tree
|
||||
# the leading path is stripped and just the target
|
||||
# file is left - for easy diffing with some other
|
||||
# version of a release
|
||||
# -custom <awkFile> Supply a custom "awk" print library
|
||||
# -toCustom <prt routine>
|
||||
# -udbParseLib <awkFile> Supply an alternate "awk" parser library
|
||||
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# ConvertRoutine
|
||||
#
|
||||
# This ksh function invokes awk to do all of the dirty
|
||||
# work. The DoAction variable is consulted only in the
|
||||
# final stages of printing the desired info after the
|
||||
# .udb "phrases" are parsed.
|
||||
#
|
||||
# -------------------------------------------------------------
|
||||
ConvertRoutine()
|
||||
{
|
||||
|
||||
|
||||
#
|
||||
# set what we are going to do
|
||||
#
|
||||
typeset DoAction=$1
|
||||
|
||||
#
|
||||
# set the "release stream" or token in a block in the .udb
|
||||
# file for which we will scan.
|
||||
#
|
||||
typeset BlockToken=$2
|
||||
|
||||
#
|
||||
# and for HP-UX releases, the particular machine 68k/Snake/S800 3/7/8
|
||||
#
|
||||
typeset machine=$3
|
||||
#
|
||||
# set flag if default blocks are to be processed
|
||||
#
|
||||
typeset UseDefaultBlocks=$4
|
||||
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
|
||||
AWK=/usr/bin/awk
|
||||
if [ -x /usr/bin/nawk ]; then
|
||||
AWK=/usr/bin/nawk
|
||||
fi
|
||||
|
||||
#
|
||||
# Custom print routines may use the following parser variables:
|
||||
# defOrder[] --- An array containing the names of the fields in
|
||||
# a data base record (in the correct order).
|
||||
# NumEntries --- One MORE than the number of entries in the
|
||||
# "defOrder" array. This is the number of fields
|
||||
# in a data base record.
|
||||
# rec[] --- An associative array indexed by data base record
|
||||
# field name containing the value of the field.
|
||||
#
|
||||
# Assign custom print routines to be used for output. The default is to
|
||||
# use the "printDb" function associated with the library.
|
||||
#
|
||||
|
||||
typeset PRT=printDb
|
||||
case "$DoAction" in
|
||||
toDB)
|
||||
PRT=printDb
|
||||
;;
|
||||
toLst)
|
||||
PRT=printLst
|
||||
;;
|
||||
toFileList|toTargetList|toCheckBuild|toReleaseTree|toDeliverArgs|toSDD)
|
||||
PRT=printGather;
|
||||
;;
|
||||
toCustom)
|
||||
CUSTOM_PRINT="-f $CUSTOM_PRINT_LIB"
|
||||
PRT=$CUS_PRT
|
||||
;;
|
||||
*) # Unknown Action
|
||||
echo "$0: Unknown Action>> \"$doAction\""
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
|
||||
cat > /tmp/awk$$ <<EOF
|
||||
#
|
||||
# The function name "PRTREC" is used by the parsing routines
|
||||
# to do the output. By providing a custom output function you
|
||||
# can print the database any way you want. The default is to
|
||||
# use the "printRecord" function built defined in the awk file
|
||||
# containing the awk parser.
|
||||
#
|
||||
function PRTREC(rec) {
|
||||
$PRT(rec)
|
||||
}
|
||||
BEGIN {
|
||||
parseUdb()
|
||||
}
|
||||
{
|
||||
print "Getting New Line AWK style -- Problem?"
|
||||
exit 1
|
||||
}
|
||||
EOF
|
||||
|
||||
#
|
||||
# Create a single awk file for use with the "-f" parameter.
|
||||
# IBM's awk only allows one "-f"
|
||||
#
|
||||
cat "$UDB_PARSE_LIB" >> /tmp/awk$$
|
||||
[ -z "$CUSTOM_PRINT" ] || cat "$CUSTOM_PRINT_LIB" >> /tmp/awk$$
|
||||
|
||||
$AWK -v mailTo="$Administrator" \
|
||||
-v action="$DoAction" \
|
||||
-v BlockToken="$BlockToken" \
|
||||
-v Machine="$machine" \
|
||||
-v UseDefaultBlocks="$UseDefaultBlocks" \
|
||||
-v DeBugFile="$DEBUGFILE" \
|
||||
-v DeBug="$DEBUGLEVEL" \
|
||||
-f /tmp/awk$$ $*
|
||||
|
||||
|
||||
#
|
||||
# Removed from parameter list because IBM's awk only allows one "-f"
|
||||
# $CUSTOM_PRINT \
|
||||
# -f "$UDB_PARSE_LIB" \
|
||||
#
|
||||
|
||||
rm /tmp/awk$$
|
||||
}
|
||||
|
||||
#
|
||||
# print a handy usage message to stderr (file descriptor 2 )
|
||||
#
|
||||
#
|
||||
usage()
|
||||
{
|
||||
exec >&2
|
||||
|
||||
echo "$ScriptName: usage:"
|
||||
echo ""
|
||||
echo " $ScriptName [Options] <UdbFile> ..."
|
||||
echo ""
|
||||
echo " -toDB convert a .udb to \".db\" format"
|
||||
echo " -toLst convert a .udb to \".lst\" format"
|
||||
echo " -toSDD convert a .udb to SDD format"
|
||||
echo " -toDeliverArgs convert a .udb to args that the deliver tool likes"
|
||||
echo " -toReleaseTree convert a .udb to a script to build a delivery tree"
|
||||
echo " -toCheckBuild convert a .udb to a script to check a build"
|
||||
echo " -toFileList convert a .udb to a list of files"
|
||||
echo " -toTargetList convert a .udb to a list of product files"
|
||||
echo " -ReleaseStream {hp-ux, osf, whatever}"
|
||||
echo " -Machine specifies machine 3,7,8 for hp-ux"
|
||||
echo " -NoDefaults do not convert any records labeled \"default\""
|
||||
echo " -Database path (obsolete) specifies full path to the .udb file to convert"
|
||||
echo " -mailTo <user> Specify a user to receive mail on errors."
|
||||
echo " -toCustom <prt> Specify the name of a custom print routine."
|
||||
echo " -custom <awkFile> Supply a custom "awk" print library."
|
||||
echo " -udbParseLib <awkFile> Supply an alternate 'awk' parser library"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# OK, here is where we really start execution.
|
||||
# Check that the first argument defines what this script is
|
||||
# supposed to do:
|
||||
|
||||
# Obscurity footprint-in-the-sand: "${1##*/}" is equivalent
|
||||
# to basename(1)
|
||||
#
|
||||
ScriptName=${0##*/}
|
||||
|
||||
# -toSDD convert a .udb to SDD format
|
||||
# -toDeliverArgs convert a .udb to args that the deliver tool likes
|
||||
# -toReleaseTree convert a .udb to a script to build a delivery tree
|
||||
# -toCheckBuild convert a .udb to a script to check the items in a build
|
||||
|
||||
if [ $# -le 3 ]; then
|
||||
usage $0
|
||||
fi
|
||||
|
||||
typeset TakeDefaultBlocks="Y"
|
||||
typeset Administrator=""
|
||||
#typeset DBTOOLSRC=/x/toolsrc/dbTools
|
||||
typeset DBTOOLSRC=`dirname $0`
|
||||
typeset UDB_PARSE_LIB="$DBTOOLSRC/udbParseLib.awk"
|
||||
typeset CUSTOM_PRINT_LIB=""
|
||||
typeset DEBUGFILE="/dev/tty"
|
||||
typeset DEBUGLEVEL=0
|
||||
|
||||
if [ $# -gt 2 ]; then
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-NoDefaults)
|
||||
TakeDefaultBlocks=N
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-toDB)
|
||||
Action=toDB
|
||||
shift;
|
||||
continue;
|
||||
;;
|
||||
-toLst)
|
||||
Action=toLst
|
||||
shift;
|
||||
continue;
|
||||
;;
|
||||
-toSDD)
|
||||
Action=toSDD
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-toDeliverArgs)
|
||||
Action=toDeliverArgs
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-toReleaseTree)
|
||||
Action=toReleaseTree
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-toCheckBuild)
|
||||
Action=toCheckBuild
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-toTargetList)
|
||||
Action=toTargetList
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-toFileList)
|
||||
Action=toFileList
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-Machine)
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
Machine=$2
|
||||
shift
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-ReleaseStream)
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
ReleaseStream=$2
|
||||
shift
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-Database)
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
if [ ! -r "$2" ]; then
|
||||
usage
|
||||
fi
|
||||
Database="$Database $2"
|
||||
shift
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-udbParseLib) # specify alternate "awk" parser location
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
if [ ! -r "$2" ]; then
|
||||
usage
|
||||
fi
|
||||
UDB_PARSE_LIB=$2
|
||||
shift
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-toCustom) # specify custom "awk" print routines
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
Action=toCustom
|
||||
CUS_PRT=$2
|
||||
shift
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-custom) # specify custom "awk" print routines
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
if [ ! -r "$2" ]; then
|
||||
usage
|
||||
fi
|
||||
CUSTOM_PRINT_LIB=$2
|
||||
shift
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-mailTo) # specify an administrator who receives mail about errors.
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
Administrator=$2
|
||||
shift
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-DeBugFile) # specify a debug file and debug level for parser debug info
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
if [ "x$3" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
DEBUGFILE=$2
|
||||
shift 2
|
||||
continue
|
||||
;;
|
||||
-DeBugLevel) # specify a debug level for parser debug info
|
||||
if [ "x$2" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
if [ "x$3" = "x" ]; then
|
||||
usage
|
||||
fi
|
||||
DEBUGLEVEL=$2
|
||||
shift 2
|
||||
continue
|
||||
;;
|
||||
-*)
|
||||
echo "unknown option: $1"
|
||||
echo ""
|
||||
usage
|
||||
exit 1;
|
||||
;;
|
||||
*) if [ ! -r $1 ]; then
|
||||
usage
|
||||
fi
|
||||
Database="$Database $1"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$Action" = "toCustom" ]; then
|
||||
if [ -z "$CUSTOM_PRINT_LIB" ]; then
|
||||
echo "You Must specify an awk file containing the custom print routine \"$CUS_PRT\""
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "$Machine" = "" ]; then
|
||||
Machine=NA
|
||||
elif [ "$Machine" = "300" ]; then
|
||||
Machine="3"
|
||||
elif [ "$Machine" = "700" ]; then
|
||||
Machine="7"
|
||||
elif [ "$Machine" = "800" ]; then
|
||||
Machine="8"
|
||||
fi
|
||||
if [ "$ReleaseStream" = "" ]; then
|
||||
echo "$ScriptName: need to specify a -ReleaseStream" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ "$Database" = "" ]; then
|
||||
echo "$ScriptName: need to specify a -Database" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
ConvertRoutine $Action $ReleaseStream $Machine $TakeDefaultBlocks $Database
|
||||
9
cde/admin/IntegTools/dbTools/uncomment
Executable file
9
cde/admin/IntegTools/dbTools/uncomment
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#! /bin/ksh
|
||||
|
||||
#
|
||||
# Script to remove comments and blank lines from ".lst" files
|
||||
# and coalesce multiple blanks/tabs into a single blank
|
||||
#
|
||||
|
||||
cat $@ | egrep -v '^[ ]*#|^[ ]*$' | sed 's/[ ][ ]*/ /g'|\
|
||||
sed 's/ $//'
|
||||
8
cde/admin/IntegTools/deinstall.dt
Normal file
8
cde/admin/IntegTools/deinstall.dt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#=============================================================================
|
||||
#=============================================================================
|
||||
# deinstall.dt
|
||||
#
|
||||
# This script has been replaced with dinstall.dt.src.
|
||||
#
|
||||
#=============================================================================
|
||||
#=============================================================================
|
||||
783
cde/admin/IntegTools/dinstall.dt.src
Executable file
783
cde/admin/IntegTools/dinstall.dt.src
Executable file
|
|
@ -0,0 +1,783 @@
|
|||
XCOMM!/bin/ksh
|
||||
XCOMM $XConsortium: dinstall.dt.src /main/6 1996/04/23 11:18:22 drk $
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM deinstall.dt
|
||||
XCOMM
|
||||
XCOMM Script to deinstall the April 1994 Snapshot Desktop on
|
||||
XCOMM HP, IBM, Sun, Fujitsu, or Novell Unix systems from a CDROM
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen - clears the screen
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
#define HASH #
|
||||
#define STAR *
|
||||
|
||||
DtiClearScreen() {
|
||||
clear 1>&2
|
||||
HASH DtiPrint "clear"
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM Log - echo to log
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - data to echo to log
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
Log()
|
||||
{
|
||||
printf "$1" $2 $3 $4 $5 >> $LOG_FILE
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiPrint - echo to stderr and log
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - data to echo to stdout
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiPrint()
|
||||
{
|
||||
printf "$1" $2 $3 $4 $5 $6 $7 $8 $9 >&2
|
||||
Log "$1" $2 $3 $4 $5 $6 $7 $8 $9
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiShow - echo to stdout
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - data to echo to stdout
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiShow()
|
||||
{
|
||||
printf "$1" $2 $3 $4 $5 $6 $7 $8 $9 >&2
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiReturn - return a string to stdout
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - data to return
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiReturn()
|
||||
{
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiWhoami
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM result of system 'whoami' command
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiWhoami()
|
||||
{
|
||||
$WHOAMI_PATH/whoami
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM Exit - log and exit
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - data to echo to log
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
Exit()
|
||||
{
|
||||
Log "\n==================================================================\n"
|
||||
Log "* $(date) $($WHOAMI_PATH/whoami)@$(hostname)*"
|
||||
Log "* $1*"
|
||||
Log "\n*exit_code = $2*"
|
||||
Log "\n==================================================================\n"
|
||||
exit $2
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM GetPlatform
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM "hpux"
|
||||
XCOMM "aix"
|
||||
XCOMM "sun"
|
||||
XCOMM "uxp"
|
||||
XCOMM "usl"
|
||||
XCOMM "dec"
|
||||
XCOMM ==========================================================================
|
||||
|
||||
GetPlatform()
|
||||
{
|
||||
if [ -z "$getPlatform" ]; then
|
||||
os=`uname -s`
|
||||
case $os in
|
||||
*HP-UX*) getPlatform=hp;;
|
||||
*AIX*) getPlatform=ibm;;
|
||||
*SunOS*) getPlatform=sun;;
|
||||
*UNIX_System_V*) getPlatform=uxp;;
|
||||
*UNIX_SV*) getPlatform=usl;;
|
||||
*OSF1*) getPlatform=dec;;
|
||||
esac
|
||||
fi
|
||||
DtiReturn $getPlatform
|
||||
}
|
||||
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM ValidOS - Verify OS is valid to deinstall on
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - Error message if invalid platform, will exit.
|
||||
XCOMM Return
|
||||
XCOMM "hpux"
|
||||
XCOMM "aix"
|
||||
XCOMM "sun"
|
||||
XCOMM "uxp"
|
||||
XCOMM "usl"
|
||||
XCOMM "dec"
|
||||
XCOMM ==========================================================================
|
||||
|
||||
ValidOS()
|
||||
{
|
||||
platform=$(GetPlatform)
|
||||
case "$platform" in
|
||||
hp|ibm|sun|uxp|usl|dec)
|
||||
DtiReturn $platform
|
||||
;;
|
||||
*) Exit $INVALID_OS_MSG 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM ResolvePathName
|
||||
XCOMM
|
||||
XCOMM Input - File Name to be resolved to actual file
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM Actual File Name resolved down to through all links
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
ResolvePathName() {
|
||||
if [ "/" = "$1" ]; then
|
||||
echo $1$2
|
||||
elif [ -L $1 ]; then
|
||||
ResolvePathName `/bin/ls -l $1 | awk '{print $NF}'` $2
|
||||
else
|
||||
ResolvePathName `dirname $1` `basename $1`${2+/}$2
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM FileIsLink
|
||||
XCOMM
|
||||
XCOMM Input - File Name
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM TRUE, if file is a link
|
||||
XCOMM FALSE, if file is not a link
|
||||
XCOMM ==========================================================================
|
||||
FileIsLink() {
|
||||
if [[ -L $1 ]] && [[ -a $1 ]]
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
else
|
||||
DtiReturn "FALSE"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM StateObjective - States the objective of the Script to the user
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
|
||||
StateObjective() {
|
||||
|
||||
XCOMM Display information to the user, ask if user wishes to continue
|
||||
|
||||
while :
|
||||
do
|
||||
DtiClearScreen
|
||||
DtiShow "$HERALD_MSG"
|
||||
DtiPrint "$OBJECTIVE_MSG"
|
||||
DtiPrint "$YESNO_MSG"
|
||||
|
||||
read response
|
||||
Log "$RESPONSE_MSG"
|
||||
Log "$response"
|
||||
Log "\n"
|
||||
|
||||
case $response in
|
||||
[yY]*) return 0
|
||||
;;
|
||||
[nN]*) exit 0
|
||||
;;
|
||||
*) continue
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DoFilesetScript - Runs a unconfiguration script in the post_install dirs
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DoFilesetScript()
|
||||
{
|
||||
FilesetName=$1
|
||||
|
||||
HASH
|
||||
HASH Check for the lowercase PLATFORM dir. If doesn't exist then
|
||||
HASH the tree is in uppercase.
|
||||
HASH
|
||||
if [ ! -f $TAR_TREE/dt.pkg ];
|
||||
then
|
||||
typeset -u ScriptName
|
||||
fi
|
||||
|
||||
|
||||
if [ "$BUILD_TREE" = "" ]
|
||||
then
|
||||
ScriptName=$3
|
||||
else
|
||||
ScriptName=$2
|
||||
fi
|
||||
|
||||
test_string=${DATABASE_FILES#*$FilesetName}
|
||||
if (( ${#DATABASE_FILES} > ${#test_string} ))
|
||||
then
|
||||
if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
|
||||
then
|
||||
DtiPrint "\n\nExecuting $PLATFORM specific $FilesetName unconfigure script...\n"
|
||||
$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -d 2>&1 | \
|
||||
tee -a $LOG_FILE
|
||||
elif [ -x $POST_INSTALL_DIR/$ScriptName ]
|
||||
then
|
||||
DtiPrint "\n\nExecuting $FilesetName unconfigure script...\n"
|
||||
$POST_INSTALL_DIR/$ScriptName -d 2>&1 | tee -a $LOG_FILE
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM RunUnconfigScripts - Runs relevant unconfiguration scripts, based on
|
||||
XCOMM fileset installed, calls DoFilesetScript
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
RunUnconfigScripts()
|
||||
{
|
||||
DtiPrint "\n\nRunning unconfigure scripts...\n"
|
||||
|
||||
DoFilesetScript CDE-TT configTT tt.cfg
|
||||
DoFilesetScript CDE-MIN configMin min.cfg
|
||||
DoFilesetScript CDE-RUN configRun run.cfg
|
||||
DoFilesetScript CDE-HELP configHelp help.cfg
|
||||
DoFilesetScript CDE-HELP-PRG configHelpPrg helpprg.cfg
|
||||
DoFilesetScript CDE-HELP-RUN configHelpRun helprun.cfg
|
||||
DoFilesetScript CDE-SHLIBS configShlibs shlibs.cfg
|
||||
DoFilesetScript CDE-AB configAb ab.cfg
|
||||
DoFilesetScript CDE-DEMOS configDemos demos.cfg
|
||||
DoFilesetScript CDE-ICONS configIcons icons.cfg
|
||||
DoFilesetScript CDE-INC configInc inc.cfg
|
||||
DoFilesetScript CDE-MAN configMan man.cfg
|
||||
DoFilesetScript CDE-MAN-DEV configManDev mandev.cvg
|
||||
DoFilesetScript CDE-MSG-CAT configMsgCat msgcat.cfg
|
||||
DoFilesetScript CDE-PRG configPrg prg.cfg
|
||||
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM ValidConfiguration - Checks to see if the desktop was installed or
|
||||
XCOMM partially installed on your system
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return - TRUE, if valid configuration
|
||||
XCOMM FALSE, for no desktop was found on the system
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
ValidConfiguration() {
|
||||
if (( [[ -a $ABSOLUTE_USR_LOCATION ]] || [[ -a $DEFAULT_USR_LOCATION ]] ) &&
|
||||
( [[ -a $ABSOLUTE_ETC_LOCATION ]] || [[ -a $DEFAULT_ETC_LOCATION ]] ) &&
|
||||
( [[ -a $ABSOLUTE_VAR_LOCATION ]] || [[ -a $DEFAULT_VAR_LOCATION ]] ))
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
else
|
||||
STATUS="FALSE"
|
||||
|
||||
for i in $ABSOLUTE_USR_LOCATION $ABSOLUTE_ETC_LOCATION \
|
||||
$ABSLOUTE_VAR_LOCATION $DEFAULT_USR_LOCATION \
|
||||
$DEFAULT_ETC_LOCATION $DEFAULT_VAR_LOCATION
|
||||
do
|
||||
if [ -a $i ]
|
||||
then
|
||||
STATUS="TRUE"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
DtiReturn "$STATUS"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DisplayDirs - Determines if directories should be presented
|
||||
XCOMM to the user to determin if they will be deleted or not.
|
||||
XCOMM
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return - TRUE, if some directories will be deleted
|
||||
XCOMM FALSE, if NO directories will be deleted
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
DisplayDirs() {
|
||||
if [[ -d $ABSOLUTE_USR_LOCATION ]] && [[ -a $ABSOLUTE_USR_LOCATION ]]
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
elif [[ -d $ABSOLUTE_ETC_LOCATION ]] && [[ -a $ABSOLUTE_ETC_LOCATION ]]
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
elif
|
||||
[[ -d $ABSOLUTE_VAR_LOCATION ]] && [[ -a $ABSOLUTE_VAR_LOCATION ]]
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
else
|
||||
DtiReturn "FALSE"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DisplayDirs - Determines if links should be presented
|
||||
XCOMM to the user to determine if they will be deleted or not.
|
||||
XCOMM
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return - TRUE, if some links will be deleted
|
||||
XCOMM FALSE, if NO links will be deleted
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
DisplayLinks() {
|
||||
if [[ -L $DEFAULT_USR_LOCATION ]] && [[ -a $DEFAULT_USR_LOCATION ]]
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
elif [[ -L $DEFAULT_ETC_LOCATION ]] && [[ -a $DEFAULT_ETC_LOCATION ]]
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
elif
|
||||
[[ -L $DEFAULT_VAR_LOCATION ]] && [[ -a $DEFAULT_VAR_LOCATION ]]
|
||||
then
|
||||
DtiReturn "TRUE"
|
||||
else
|
||||
DtiReturn "FALSE"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM ShowDirsToBeDeleted - Shows what dirs and links will be deleted to the user
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
|
||||
ShowDirsToBeDeleted() {
|
||||
|
||||
XCOMM Display information to the user, ask if user wishes to continue
|
||||
|
||||
while :
|
||||
do
|
||||
DtiClearScreen
|
||||
DtiShow "$HERALD_MSG"
|
||||
|
||||
if [ $(DisplayDirs) = "TRUE" ]
|
||||
then
|
||||
DtiPrint "$DELETE_DIRS_MSG"
|
||||
if [ -a $ABSOLUTE_USR_LOCATION ]
|
||||
then
|
||||
DtiPrint "$DIR_MSG" "$ABSOLUTE_USR_LOCATION"
|
||||
fi
|
||||
|
||||
if [ -a $ABSOLUTE_ETC_LOCATION ]
|
||||
then
|
||||
DtiPrint "$DIR_MSG" "$ABSOLUTE_ETC_LOCATION"
|
||||
fi
|
||||
|
||||
if [ -a $ABSOLUTE_VAR_LOCATION ]
|
||||
then
|
||||
DtiPrint "$DIR_MSG" "$ABSOLUTE_VAR_LOCATION"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $(DisplayLinks) = "TRUE" ]
|
||||
then
|
||||
DtiPrint "\n\n$DELETE_LINKS_MSG"
|
||||
if [ $(FileIsLink $DEFAULT_USR_LOCATION) = "TRUE" ]
|
||||
then
|
||||
DtiPrint "$LINK_DIR_MSG" "$DEFAULT_USR_LOCATION"
|
||||
fi
|
||||
|
||||
if [ $(FileIsLink $DEFAULT_ETC_LOCATION) = "TRUE" ]
|
||||
then
|
||||
DtiPrint "$LINK_DIR_MSG" "$DEFAULT_ETC_LOCATION"
|
||||
fi
|
||||
|
||||
if [ $(FileIsLink $DEFAULT_VAR_LOCATION) = "TRUE" ]
|
||||
then
|
||||
DtiPrint "$LINK_DIR_MSG" "$DEFAULT_VAR_LOCATION"
|
||||
fi
|
||||
fi
|
||||
|
||||
DtiPrint "\n\n$WARNING_MSG"
|
||||
DtiPrint "\n\n\n$YESNO_MSG"
|
||||
|
||||
read response
|
||||
Log "$RESPONSE_MSG"
|
||||
Log "$response"
|
||||
Log "\n"
|
||||
|
||||
case $response in
|
||||
[yY]*) return 0
|
||||
;;
|
||||
[nN]*) exit 0
|
||||
;;
|
||||
*) continue
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM StopDesktop - Stops the desktop if it was running
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
StopDesktop() {
|
||||
|
||||
if [ -f $ABSOLUTE_VAR_LOCATION/Xpid ]
|
||||
then
|
||||
DtiPrint "\n\nStopping Desktop... \n"
|
||||
kill -TERM `cat $ABSOLUTE_VAR_LOCATION/Xpid` 2> /dev/null
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM RemoveDesktop - Deletes Desktop files from the system
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
RemoveDesktop () {
|
||||
|
||||
DtiPrint "Removing files from Desktop Directories...\n"
|
||||
rm -rf $ABSOLUTE_USR_LOCATION
|
||||
rm -rf $ABSOLUTE_ETC_LOCATION
|
||||
rm -rf $ABSOLUTE_VAR_LOCATION
|
||||
|
||||
rm -rf $DEFAULT_USR_LOCATION
|
||||
rm -rf $DEFAULT_ETC_LOCATION
|
||||
rm -rf $DEFAULT_VAR_LOCATION
|
||||
DtiPrint "The Desktop was successfully removed from your system.\n"
|
||||
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM
|
||||
XCOMM This is the MAIN of the script
|
||||
XCOMM
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM Set up Messages
|
||||
USAGE_MSG="\
|
||||
Usage: deinstall.dt [-noprompt]\n"
|
||||
|
||||
PERMISSION_MSG="\
|
||||
You must be ROOT to run this command\n"
|
||||
|
||||
RESPONSE_MSG="\n
|
||||
response is: "
|
||||
|
||||
HERALD_MSG="\
|
||||
The Common Open Systems Environment Desktop\n\
|
||||
April 1994 Snapshot Deinstallation Procedure\n\n"
|
||||
|
||||
OBJECTIVE_MSG="\
|
||||
This procedure will REMOVE the Desktop from your system.\n\n\n"
|
||||
|
||||
YESNO_MSG="\
|
||||
Do you wish to continue? [y/n] "
|
||||
|
||||
DELETE_DIRS_MSG="\
|
||||
The deinstallation will remove files from the following\n\
|
||||
directories listed below:\n\n"
|
||||
|
||||
DIR_MSG="\
|
||||
'%s'\n"
|
||||
|
||||
DELETE_LINKS_MSG="\
|
||||
The deinstallation will remove the following symbolic \n\
|
||||
link(s) listed below:\n\n"
|
||||
|
||||
LINK_DIR_MSG="\
|
||||
'%s'\n"
|
||||
|
||||
WARNING_MSG="\
|
||||
Any customizations made will be LOST!\n"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INVALID_OS_MSG="\
|
||||
The Desktop does not support this system configuration.\n\
|
||||
The deinstallation procedure will terminate.\n"
|
||||
|
||||
INVALID_CONFIGURATION_MSG="\
|
||||
The deinstallation procedure could not locate any Desktop files\n\
|
||||
on your system. The deinstallation will terminate. Please check\n\
|
||||
that you are running the deinstallation script on a system that\n\
|
||||
has the Desktop already installed.\n"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
XCOMM Set up variables
|
||||
NO_PROMPT="FALSE"
|
||||
|
||||
DEFAULT_USR_LOCATION="/usr/dt"
|
||||
DEFAULT_ETC_LOCATION="/etc/dt"
|
||||
DEFAULT_VAR_LOCATION="/var/dt"
|
||||
|
||||
ABSOLUTE_USR_LOCATION=$(ResolvePathName $DEFAULT_USR_LOCATION)
|
||||
ABSOLUTE_ETC_LOCATION=$(ResolvePathName $DEFAULT_ETC_LOCATION)
|
||||
ABSOLUTE_VAR_LOCATION=$(ResolvePathName $DEFAULT_VAR_LOCATION)
|
||||
|
||||
|
||||
XCOMM Set up the log file
|
||||
LOG_FILE="/tmp/dinstall.dt.log"
|
||||
if [ -f $LOG_FILE ]
|
||||
then
|
||||
rm -rf $LOG_FILE 2>/dev/null
|
||||
fi
|
||||
touch $LOG_FILE 2>/dev/null
|
||||
chmod 777 $LOG_FILE 2>/dev/null
|
||||
|
||||
|
||||
|
||||
|
||||
XCOMM change directories to deinstall.dt location as all
|
||||
XCOMM installation packages are relative to this
|
||||
XCOMM
|
||||
if [ ${0%/STAR} != "dinstall.dt" ]; then
|
||||
cd ${0%/STAR}
|
||||
fi
|
||||
|
||||
|
||||
XCOMM set up the TOP directory of where the CD is mounted
|
||||
TOP=`pwd`
|
||||
|
||||
|
||||
XCOMM set up the path for whoami command
|
||||
WHOAMI_PATH=/bin
|
||||
platform=$(GetPlatform)
|
||||
case "$platform" in
|
||||
hp) WHOAMI_PATH=/usr/bin
|
||||
;;
|
||||
ibm) WHOAMI_PATH=/bin
|
||||
;;
|
||||
sun) WHOAMI_PATH=/usr/ucb
|
||||
;;
|
||||
uxp) WHOAMI_PATH=/usr/ucb
|
||||
;;
|
||||
usl) WHOAMI_PATH=/usr/ucb
|
||||
;;
|
||||
dec) WHOAMI_PATH=/usr/bin
|
||||
;;
|
||||
esac
|
||||
|
||||
DTIDINSTALLDT=dinstall.dt
|
||||
DTICONFIGDIR=config
|
||||
dtiPlatform=$(GetPlatform)
|
||||
DTIPLATFORMDIR=$dtiPlatform
|
||||
DTIREADME=config/config.$dtiPlatform
|
||||
|
||||
if [ ${0##STAR/} != $DTIDINSTALLDT ]; then
|
||||
HASH
|
||||
HASH CDROM driver folds filenames to uppercase
|
||||
HASH
|
||||
typeset -u DTIDINSTALLDT
|
||||
typeset -u DTICONFIGDIR
|
||||
typeset -u DTIPLATFORMDIR
|
||||
typeset -u DTIREADME
|
||||
fi
|
||||
|
||||
|
||||
XCOMM Parse the command line
|
||||
while [ $# -ne 0 ];
|
||||
do
|
||||
case $1 in
|
||||
-noprompt) NO_PROMPT=TRUE
|
||||
print "NO_PROMPT is set"
|
||||
shift
|
||||
;;
|
||||
*) print "$USAGE_MSG"
|
||||
DtiPrint $USAGE
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
XCOMM Verify that we have the Root User
|
||||
if [ $(DtiWhoami) != "root" ]
|
||||
then
|
||||
DtiShow "$PERMISSION_MSG"
|
||||
Exit "$PERMISSION_MSG" 1
|
||||
fi
|
||||
|
||||
XCOMM Check to see if the Desktop is actually installed on the system
|
||||
if [ $(ValidConfiguration ) != "TRUE" ]
|
||||
then
|
||||
DtiPrint "$INVALID_CONFIGURATION_MSG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XCOMM Determine if the OS is supported
|
||||
PLATFORM=$(ValidOS)
|
||||
|
||||
XCOMM
|
||||
XCOMM Initially PLATFORM is in lower case.
|
||||
XCOMM Check if the $PLATFORM directory exists.
|
||||
XCOMM if doesn't exist translate all to upper case.
|
||||
XCOMM
|
||||
|
||||
if [ -d $PLATFORM ]
|
||||
then
|
||||
TAR_TREE=$TOP/$PLATFORM
|
||||
POST_INSTALL_DIR=$TAR_TREE/config
|
||||
DATABASE_FILES=$(awk 'BEGIN {FS=":"} /FILESETS: /{print $2}' $TAR_TREE/dt.pkg 2>/dev/null)
|
||||
else
|
||||
PLATFORM=`echo "$PLATFORM" | /usr/bin/tr "[a-z]" "[A-Z]"`
|
||||
TAR_TREE=$TOP/$PLATFORM
|
||||
POST_INSTALL_DIR=$TAR_TREE/CONFIG
|
||||
DATABASE_FILES=$(awk 'BEGIN {FS=":"} /FILESETS: /{print $2}' $TAR_TREE/DT.PKG 2>/dev/null)
|
||||
fi
|
||||
|
||||
|
||||
XCOMM Tell the user what is going to happen
|
||||
if [ $NO_PROMPT = FALSE ]
|
||||
then
|
||||
StateObjective
|
||||
fi
|
||||
|
||||
XCOMM Show the user what directories are going to be deleted
|
||||
if [ $NO_PROMPT = FALSE ]
|
||||
then
|
||||
ShowDirsToBeDeleted
|
||||
fi
|
||||
|
||||
|
||||
XCOMM Stop the Desktop
|
||||
StopDesktop
|
||||
|
||||
XCOMM Run the Unconfigure Scripts
|
||||
RunUnconfigScripts
|
||||
|
||||
XCOMM Remove the Desktop Files
|
||||
RemoveDesktop
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
91
cde/admin/IntegTools/ezinstall.hp
Executable file
91
cde/admin/IntegTools/ezinstall.hp
Executable file
|
|
@ -0,0 +1,91 @@
|
|||
#!/bin/ksh
|
||||
|
||||
echo ""
|
||||
echo "ezinstall.hp is a very plain, very vanilla, very simple installation"
|
||||
echo "script that installs the CDE Desktop and executes a set of config-"
|
||||
echo "uration scripts. It assumes that you have set aside ample space - "
|
||||
echo "about 46 Mb - for installation."
|
||||
echo ""
|
||||
echo "The Desktop is installed into the directory /usr/dt. This is the"
|
||||
echo "logical top of CDE. If you wish to change the physical location"
|
||||
echo "of the files, set up a symbolic link between /usr/dt and the actual"
|
||||
echo "location. E.g., if you wish to physically locate the CDE files in"
|
||||
echo "/bigdisk/opt, do a 'ln -s /bigdisk/opt /usr/dt' before executing the"
|
||||
echo "ezinstall.hp script."
|
||||
echo ""
|
||||
echo "Okay?"
|
||||
echo ""
|
||||
|
||||
read response
|
||||
|
||||
if [ `/usr/bin/whoami` != "root" ]
|
||||
then
|
||||
echo ""
|
||||
echo "You must be root to run this script"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "" -o "$2" = "" ]
|
||||
then
|
||||
echo "Usage: ezinstall <the compressed tar of dt> <the tar of the scripts>"
|
||||
echo " [ -clean ]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ztar=$1
|
||||
star=$2
|
||||
|
||||
#
|
||||
# have to install in /usr/dt
|
||||
#
|
||||
# clean it first
|
||||
#
|
||||
|
||||
if [ "$3" = "-clean" ]
|
||||
then
|
||||
rm -rf /usr/dt/*
|
||||
rm -rf /var/dt/*
|
||||
fi
|
||||
|
||||
if [ "$1" != "skip" ]
|
||||
then
|
||||
compress -d <$ztar | tar xvf -
|
||||
fi
|
||||
|
||||
#
|
||||
# place the scripts in /tmp/ez
|
||||
#
|
||||
|
||||
mkdir /tmp/ez
|
||||
echo "$PWD: copying $star to /tmp/ez"
|
||||
cp $star /tmp/ez
|
||||
|
||||
cd /tmp/ez
|
||||
tarfile=${star##*/}
|
||||
tar xvf $tarfile
|
||||
|
||||
#
|
||||
# execute each of the scripts
|
||||
#
|
||||
|
||||
for i in config* hp/config*
|
||||
do
|
||||
if [ -f $i ]
|
||||
then
|
||||
if [ ! -x $i ]
|
||||
then
|
||||
chmod 555 $i
|
||||
fi
|
||||
echo "executing $i script"
|
||||
./$i
|
||||
fi
|
||||
done
|
||||
|
||||
cd /tmp
|
||||
rm -rf /tmp/ez
|
||||
|
||||
echo ""
|
||||
echo "All done!"
|
||||
echo "type /usr/dt/bin/dtlogin to start CDE"
|
||||
echo ""
|
||||
1736
cde/admin/IntegTools/install-cde
Normal file
1736
cde/admin/IntegTools/install-cde
Normal file
File diff suppressed because it is too large
Load diff
128
cde/admin/IntegTools/install.dt.dec.src
Normal file
128
cde/admin/IntegTools/install.dt.dec.src
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
XCOMM $XConsortium: install.dt.dec.src /main/3 1996/11/19 11:43:45 drk $
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM install.dt.dec.src
|
||||
XCOMM
|
||||
XCOMM Platform specific function overrides for the April 1994 Snapshot
|
||||
XCOMM install script, install.dt.
|
||||
XCOMM
|
||||
XCOMM This file is sourced by the install.dt script to allow platform
|
||||
XCOMM specific behavior for certain functionality. These functions are:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clear the screen
|
||||
XCOMM DtiFreeSpace() - return available bytes in a directory
|
||||
XCOMM DtiVerifyConfiguration() - verify system configuration
|
||||
XCOMM DtiWhoami() - return user name
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clears the screen
|
||||
XCOMM
|
||||
XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
|
||||
XCOMM screen. If this platform does not have the 'clear' command,
|
||||
XCOMM declare DtiClearScreen() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
|
||||
XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
|
||||
XCOMM use it if possible.
|
||||
XCOMM
|
||||
XCOMM Example:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen()
|
||||
XCOMM {
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM }
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiClearScreen() {
|
||||
XCOMM clear 1>&2
|
||||
XCOMM }
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiFreeSpace
|
||||
XCOMM
|
||||
XCOMM The default DtiFreeSpace() does not check for free space, rather it
|
||||
XCOMM simply returns a BigNumber that install.dt will assume is large
|
||||
XCOMM enough in which to install the desktop.
|
||||
XCOMM
|
||||
XCOMM Declare DtiFreeSpace() here to return the actual available space for
|
||||
XCOMM a particular directory.
|
||||
XCOMM
|
||||
XCOMM The $1 parameter will contain the directory name to test. The directory
|
||||
XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
|
||||
XCOMM available via the DtiReturn() function.
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - directory name
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM number of bytes available
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiFreeSpace()
|
||||
{
|
||||
BDFOUT=`df -k $1 | awk '{print $4}'`
|
||||
for i in $BDFOUT
|
||||
do
|
||||
if [ "$i" != "Avail" ]
|
||||
then
|
||||
i=`expr $i \* 1024`
|
||||
DtiReturn "$i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiVerifyConfiguration
|
||||
XCOMM
|
||||
XCOMM The default DtiVerifyConfiguration() does no system configuration
|
||||
XCOMM testing. For a particular platform, one might want to test for
|
||||
XCOMM the presence of X11R5 or the OS version, for example, before allowing
|
||||
XCOMM the desktop to be installed.
|
||||
XCOMM
|
||||
XCOMM Declare this function to make such platform specific tests. Return
|
||||
XCOMM "yes" if the system passed, or "<message text>" if the system failed
|
||||
XCOMM in which case install.dt will display the <message text> as the reason.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM "yes" - system configuration verified
|
||||
XCOMM "<message text>" - verification failed, display message text
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiVerifyConfiguration()
|
||||
XCOMM {
|
||||
XCOMM DtiReturn "yes"
|
||||
XCOMM }
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiWhoami
|
||||
XCOMM
|
||||
XCOMM The default DtiWhoami() uses the 'whoami' command to determine
|
||||
XCOMM the user name. If this platform does not have the 'whoami' command,
|
||||
XCOMM declare DtiWhoami() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM result of system 'whoami' command
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiWhoami()
|
||||
{
|
||||
/usr/bin/whoami
|
||||
}
|
||||
|
||||
126
cde/admin/IntegTools/install.dt.hp.src
Normal file
126
cde/admin/IntegTools/install.dt.hp.src
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
XCOMM $XConsortium: install.dt.hp.src /main/3 1996/04/21 19:06:53 drk $
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM install.dt.hp
|
||||
XCOMM
|
||||
XCOMM Platform specific function overrides for the April 1994 Snapshot
|
||||
XCOMM install script, install.dt.
|
||||
XCOMM
|
||||
XCOMM This file is sourced by the install.dt script to allow platform
|
||||
XCOMM specific behavior for certain functionality. These functions are:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clear the screen
|
||||
XCOMM DtiFreeSpace() - return available bytes in a directory
|
||||
XCOMM DtiVerifyConfiguration() - verify system configuration
|
||||
XCOMM DtiWhoami() - return user name
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clears the screen
|
||||
XCOMM
|
||||
XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
|
||||
XCOMM screen. If this platform does not have the 'clear' command,
|
||||
XCOMM declare DtiClearScreen() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
|
||||
XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
|
||||
XCOMM use it if possible.
|
||||
XCOMM
|
||||
XCOMM Example:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen()
|
||||
XCOMM {
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM }
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiClearScreen() {
|
||||
XCOMM clear 1>&2
|
||||
XCOMM }
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiFreeSpace
|
||||
XCOMM
|
||||
XCOMM The default DtiFreeSpace() does not check for free space, rather it
|
||||
XCOMM simply returns a BigNumber that install.dt will assume is large
|
||||
XCOMM enough in which to install the desktop.
|
||||
XCOMM
|
||||
XCOMM Declare DtiFreeSpace() here to return the actual available space for
|
||||
XCOMM a particular directory.
|
||||
XCOMM
|
||||
XCOMM The $1 parameter will contain the directory name to test. The directory
|
||||
XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
|
||||
XCOMM available via the DtiReturn() function.
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - directory name
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM number of bytes available
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiFreeSpace()
|
||||
{
|
||||
BDFOUT=`bdf $1 | awk '{print $4}'`
|
||||
for i in $BDFOUT
|
||||
do
|
||||
if [ "$i" != "avail" ]
|
||||
then
|
||||
DtiReturn "$i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiVerifyConfiguration
|
||||
XCOMM
|
||||
XCOMM The default DtiVerifyConfiguration() does no system configuration
|
||||
XCOMM testing. For a particular platform, one might want to test for
|
||||
XCOMM the presence of X11R5 or the OS version, for example, before allowing
|
||||
XCOMM the desktop to be installed.
|
||||
XCOMM
|
||||
XCOMM Declare this function to make such platform specific tests. Return
|
||||
XCOMM "yes" if the system passed, or "<message text>" if the system failed
|
||||
XCOMM in which case install.dt will display the <message text> as the reason.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM "yes" - system configuration verified
|
||||
XCOMM "<message text>" - verification failed, display message text
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiVerifyConfiguration()
|
||||
XCOMM {
|
||||
XCOMM DtiReturn "yes"
|
||||
XCOMM }
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiWhoami
|
||||
XCOMM
|
||||
XCOMM The default DtiWhoami() uses the 'whoami' command to determine
|
||||
XCOMM the user name. If this platform does not have the 'whoami' command,
|
||||
XCOMM declare DtiWhoami() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM result of system 'whoami' command
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiWhoami()
|
||||
XCOMM {
|
||||
XCOMM whoami
|
||||
XCOMM }
|
||||
158
cde/admin/IntegTools/install.dt.ibm.src
Normal file
158
cde/admin/IntegTools/install.dt.ibm.src
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
XCOMM $XConsortium: install.dt.ibm.src /main/3 1996/04/21 19:06:56 drk $
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM install.dt.ibm
|
||||
XCOMM
|
||||
XCOMM Platform specific function overrides for the April 1994 Snapshot
|
||||
XCOMM install script, install.dt.
|
||||
XCOMM
|
||||
XCOMM This file is sourced by the install.dt script to allow platform
|
||||
XCOMM specific behavior for certain functionality. These functions are:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clear the screen
|
||||
XCOMM DtiFreeSpace() - return available bytes in a directory
|
||||
XCOMM DtiVerifyConfiguration() - verify system configuration
|
||||
XCOMM DtiWhoami() - return user name
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clears the screen
|
||||
XCOMM
|
||||
XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
|
||||
XCOMM screen. If this platform does not have the 'clear' command,
|
||||
XCOMM declare DtiClearScreen() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
|
||||
XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
|
||||
XCOMM use it if possible.
|
||||
XCOMM
|
||||
XCOMM Example:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen()
|
||||
XCOMM {
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM }
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiClearScreen() {
|
||||
XCOMM clear 1>&2
|
||||
XCOMM }
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiFreeSpace
|
||||
XCOMM
|
||||
XCOMM The default DtiFreeSpace() does not check for free space, rather it
|
||||
XCOMM simply returns a BigNumber that install.dt will assume is large
|
||||
XCOMM enough in which to install the desktop.
|
||||
XCOMM
|
||||
XCOMM Declare DtiFreeSpace() here to return the actual available space for
|
||||
XCOMM a particular directory.
|
||||
XCOMM
|
||||
XCOMM The $1 parameter will contain the directory name to test. The directory
|
||||
XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
|
||||
XCOMM available via the DtiReturn() function.
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - directory name
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM number of bytes available
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiFreeSpace()
|
||||
{
|
||||
dtspace=`df $1 | awk '
|
||||
BEGIN{
|
||||
a = 1
|
||||
}
|
||||
{
|
||||
if($1 == "Filesystem") {
|
||||
getline
|
||||
space = $3*1024
|
||||
}
|
||||
}
|
||||
END{
|
||||
a = space
|
||||
print a
|
||||
} ' `
|
||||
DtiReturn $dtspace
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiVerifyConfiguration
|
||||
XCOMM
|
||||
XCOMM The default DtiVerifyConfiguration() does no system configuration
|
||||
XCOMM testing. For a particular platform, one might want to test for
|
||||
XCOMM the presence of X11R5 or the OS version, for example, before allowing
|
||||
XCOMM the desktop to be installed.
|
||||
XCOMM
|
||||
XCOMM Declare this function to make such platform specific tests. Return
|
||||
XCOMM "yes" if the system passed, or "<message text>" if the system failed
|
||||
XCOMM in which case install.dt will display the <message text> as the reason.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM "yes" - system configuration verified
|
||||
XCOMM "<message text>" - verification failed, display message text
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiVerifyConfiguration()
|
||||
{
|
||||
IsX11R5=`lslpp -h | awk '
|
||||
BEGIN {
|
||||
X11R5=0
|
||||
}
|
||||
/X11rte.obj/ {
|
||||
getline
|
||||
if(($1 == "01.02.0003.0000") && ($2 == "COMPLETE")) {
|
||||
X11R5=1
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
END {
|
||||
print X11R5
|
||||
}'`
|
||||
|
||||
if [ $IsX11R5 = 1 ];
|
||||
then
|
||||
DtiReturn "yes"
|
||||
else
|
||||
DtiReturn "The Desktop requires that X11R5 be installed on your system.\n
|
||||
0) Continue with Desktop Installation
|
||||
99) Exit Desktop Installation
|
||||
|
||||
Please enter selection: "
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiWhoami
|
||||
XCOMM
|
||||
XCOMM The default DtiWhoami() uses the 'whoami' command to determine
|
||||
XCOMM the user name. If this platform does not have the 'whoami' command,
|
||||
XCOMM declare DtiWhoami() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM result of system 'whoami' command
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiWhoami()
|
||||
XCOMM {
|
||||
XCOMM whoami
|
||||
XCOMM }
|
||||
1157
cde/admin/IntegTools/install.dt.src
Normal file
1157
cde/admin/IntegTools/install.dt.src
Normal file
File diff suppressed because it is too large
Load diff
128
cde/admin/IntegTools/install.dt.sun.src
Normal file
128
cde/admin/IntegTools/install.dt.sun.src
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
XCOMM $XConsortium: install.dt.sun.src /main/3 1996/04/21 19:07:03 drk $
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM install.dt.sun
|
||||
XCOMM
|
||||
XCOMM Platform specific function overrides for the April 1994 Snapshot
|
||||
XCOMM install script, install.dt.
|
||||
XCOMM
|
||||
XCOMM This file is sourced by the install.dt script to allow platform
|
||||
XCOMM specific behavior for certain functionality. These functions are:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clear the screen
|
||||
XCOMM DtiFreeSpace() - return available bytes in a directory
|
||||
XCOMM DtiVerifyConfiguration() - verify system configuration
|
||||
XCOMM DtiWhoami() - return user name
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clears the screen
|
||||
XCOMM
|
||||
XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
|
||||
XCOMM screen. If this platform does not have the 'clear' command,
|
||||
XCOMM declare DtiClearScreen() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
|
||||
XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
|
||||
XCOMM use it if possible.
|
||||
XCOMM
|
||||
XCOMM Example:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen()
|
||||
XCOMM {
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM }
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiClearScreen() {
|
||||
XCOMM clear 1>&2
|
||||
XCOMM }
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiFreeSpace
|
||||
XCOMM
|
||||
XCOMM The default DtiFreeSpace() does not check for free space, rather it
|
||||
XCOMM simply returns a BigNumber that install.dt will assume is large
|
||||
XCOMM enough in which to install the desktop.
|
||||
XCOMM
|
||||
XCOMM Declare DtiFreeSpace() here to return the actual available space for
|
||||
XCOMM a particular directory.
|
||||
XCOMM
|
||||
XCOMM The $1 parameter will contain the directory name to test. The directory
|
||||
XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
|
||||
XCOMM available via the DtiReturn() function.
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - directory name
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM number of bytes available
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiFreeSpace()
|
||||
{
|
||||
BDFOUT=`df -k $1 | awk '{print $4}'`
|
||||
for i in $BDFOUT
|
||||
do
|
||||
if [ "$i" != "avail" ]
|
||||
then
|
||||
i=`expr $i \* 1024`
|
||||
DtiReturn "$i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiVerifyConfiguration
|
||||
XCOMM
|
||||
XCOMM The default DtiVerifyConfiguration() does no system configuration
|
||||
XCOMM testing. For a particular platform, one might want to test for
|
||||
XCOMM the presence of X11R5 or the OS version, for example, before allowing
|
||||
XCOMM the desktop to be installed.
|
||||
XCOMM
|
||||
XCOMM Declare this function to make such platform specific tests. Return
|
||||
XCOMM "yes" if the system passed, or "<message text>" if the system failed
|
||||
XCOMM in which case install.dt will display the <message text> as the reason.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM "yes" - system configuration verified
|
||||
XCOMM "<message text>" - verification failed, display message text
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
XCOMM DtiVerifyConfiguration()
|
||||
XCOMM {
|
||||
XCOMM DtiReturn "yes"
|
||||
XCOMM }
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiWhoami
|
||||
XCOMM
|
||||
XCOMM The default DtiWhoami() uses the 'whoami' command to determine
|
||||
XCOMM the user name. If this platform does not have the 'whoami' command,
|
||||
XCOMM declare DtiWhoami() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM result of system 'whoami' command
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiWhoami()
|
||||
{
|
||||
/usr/ucb/whoami
|
||||
}
|
||||
174
cde/admin/IntegTools/install.dt.usl.src
Normal file
174
cde/admin/IntegTools/install.dt.usl.src
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
XCOMM $XConsortium: install.dt.usl.src /main/4 1996/04/23 11:19:27 drk $
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM install.dt.usl
|
||||
XCOMM
|
||||
XCOMM Platform specific function overrides for the April 1994 Snapshot
|
||||
XCOMM install script, install.dt.
|
||||
XCOMM
|
||||
XCOMM This file is sourced by the install.dt script to allow platform
|
||||
XCOMM specific behavior for certain functionality. These functions are:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clear the screen
|
||||
XCOMM DtiFreeSpace() - return available bytes in a directory
|
||||
XCOMM DtiVerifyConfiguration() - verify system configuration
|
||||
XCOMM DtiWhoami() - return user name
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
#define HASH #
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clears the screen
|
||||
XCOMM
|
||||
XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
|
||||
XCOMM screen. If this platform does not have the 'clear' command,
|
||||
XCOMM declare DtiClearScreen() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
|
||||
XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
|
||||
XCOMM use it if possible.
|
||||
XCOMM
|
||||
XCOMM Example:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen()
|
||||
XCOMM {
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM }
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM
|
||||
XCOMM USL uses the default (clear). We'll define it here to ensure usage.
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiClearScreen() {
|
||||
clear 1>&2
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiFreeSpace
|
||||
XCOMM
|
||||
XCOMM The default DtiFreeSpace() does not check for free space, rather it
|
||||
XCOMM simply returns a BigNumber that install.dt will assume is large
|
||||
XCOMM enough in which to install the desktop.
|
||||
XCOMM
|
||||
XCOMM Declare DtiFreeSpace() here to return the actual available space for
|
||||
XCOMM a particular directory.
|
||||
XCOMM
|
||||
XCOMM The $1 parameter will contain the directory name to test. The directory
|
||||
XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
|
||||
XCOMM available via the DtiReturn() function.
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - directory name
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM number of bytes available
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiFreeSpace()
|
||||
{
|
||||
blocks="$(df "$1" | sed 's/^.*://' | awk '{print $1}')"
|
||||
case "$blocks" in
|
||||
[0-9]*) let blocks=blocks*512
|
||||
DtiReturn "$blocks" ;;
|
||||
*) DtiReturn "0" ;; # install.dt warn and confirm
|
||||
esac
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiVerifyConfiguration
|
||||
XCOMM
|
||||
XCOMM The default DtiVerifyConfiguration() does no system configuration
|
||||
XCOMM testing. For a particular platform, one might want to test for
|
||||
XCOMM the presence of X11R5 or the OS version, for example, before allowing
|
||||
XCOMM the desktop to be installed.
|
||||
XCOMM
|
||||
XCOMM Declare this function to make such platform specific tests. Return
|
||||
XCOMM "yes" if the system passed, or "<message text>" if the system failed
|
||||
XCOMM in which case install.dt will display the <message text> as the reason.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM "yes" - system configuration verified
|
||||
XCOMM "<message text>" - verification failed, display message text
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiVerifyConfiguration()
|
||||
{
|
||||
if [ "$(uname -s)" = UNIX_SV -a "$(uname -r)" = 4.2 ]
|
||||
then
|
||||
if [ "$(uname -v)" = 1.0 ]
|
||||
then
|
||||
DtiReturn \
|
||||
"WARNING: THE CDE DESKTOP IS NOT SUPPORTED ON UnixWare 1.0"
|
||||
else
|
||||
HASH for all 4.2 releases after 1.0
|
||||
DtiReturn "yes"
|
||||
fi
|
||||
else
|
||||
DtiReturn "ERROR: THIS IS NOT A \"UNIX_SV 4.2\" SYSTEM"
|
||||
fi
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiWhoami
|
||||
XCOMM
|
||||
XCOMM The default DtiWhoami() uses the 'whoami' command to determine
|
||||
XCOMM the user name. If this platform does not have the 'whoami' command,
|
||||
XCOMM declare DtiWhoami() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM result of system 'whoami' command
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiWhoami()
|
||||
{
|
||||
/usr/ucb/whoami
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiPrint - echo to stderr and log
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - data to echo to stdout and log
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM
|
||||
XCOMM Override on UnixWare because of printf "%s" integer-const problem
|
||||
XCOMM This coordinates with the leading blank in the passing of " $meg" in master.
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiPrint()
|
||||
{
|
||||
if [ "$#" -gt 1 ]
|
||||
then
|
||||
if [ "$#" -gt 5 ]
|
||||
then
|
||||
printf "$1" "$2" "$3" "$4" "$5" "$6" $7 $8 $9 >&2
|
||||
else
|
||||
if [ "$#" -gt 4 ]
|
||||
then
|
||||
printf "$1" "$2" "$3" "$4" "$5" $6 $7 $8 $9 >&2
|
||||
else
|
||||
printf "$1" "$2" $3 $4 $5 $6 $7 $8 $9 >&2
|
||||
fi
|
||||
fi
|
||||
else
|
||||
printf "$1" $2 $3 $4 $5 $6 $7 $8 $9 >&2
|
||||
fi
|
||||
Log "$1" $2 $3 $4 $5 $6 $7 $8 $9
|
||||
}
|
||||
175
cde/admin/IntegTools/install.dt.uxp.src
Normal file
175
cde/admin/IntegTools/install.dt.uxp.src
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
XCOMM $XConsortium: install.dt.uxp.src /main/4 1996/11/19 11:44:17 drk $
|
||||
XCOMM ==========================================================================
|
||||
XCOMM ==========================================================================
|
||||
XCOMM install.dt.usl
|
||||
XCOMM
|
||||
XCOMM Platform specific function overrides for the April 1994 Snapshot
|
||||
XCOMM install script, install.dt.
|
||||
XCOMM
|
||||
XCOMM This file is sourced by the install.dt script to allow platform
|
||||
XCOMM specific behavior for certain functionality. These functions are:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clear the screen
|
||||
XCOMM DtiFreeSpace() - return available bytes in a directory
|
||||
XCOMM DtiVerifyConfiguration() - verify system configuration
|
||||
XCOMM DtiWhoami() - return user name
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
#define HASH #
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen() - clears the screen
|
||||
XCOMM
|
||||
XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
|
||||
XCOMM screen. If this platform does not have the 'clear' command,
|
||||
XCOMM declare DtiClearScreen() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
|
||||
XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
|
||||
XCOMM use it if possible.
|
||||
XCOMM
|
||||
XCOMM Example:
|
||||
XCOMM
|
||||
XCOMM DtiClearScreen()
|
||||
XCOMM {
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
XCOMM }
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM
|
||||
XCOMM USL uses the default (clear). We'll define it here to ensure usage.
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiClearScreen() {
|
||||
clear 1>&2
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiFreeSpace
|
||||
XCOMM
|
||||
XCOMM The default DtiFreeSpace() does not check for free space, rather it
|
||||
XCOMM simply returns a BigNumber that install.dt will assume is large
|
||||
XCOMM enough in which to install the desktop.
|
||||
XCOMM
|
||||
XCOMM Declare DtiFreeSpace() here to return the actual available space for
|
||||
XCOMM a particular directory.
|
||||
XCOMM
|
||||
XCOMM The $1 parameter will contain the directory name to test. The directory
|
||||
XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
|
||||
XCOMM available via the DtiReturn() function.
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - directory name
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM number of bytes available
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiFreeSpace()
|
||||
{
|
||||
blocks="$(df "$1" | sed 's/^.*://' | awk '{print $1}')"
|
||||
case "$blocks" in
|
||||
[0-9]*) let blocks=blocks*512
|
||||
DtiReturn "$blocks" ;;
|
||||
*) DtiReturn "0" ;; # install.dt warn and confirm
|
||||
esac
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiVerifyConfiguration
|
||||
XCOMM
|
||||
XCOMM The default DtiVerifyConfiguration() does no system configuration
|
||||
XCOMM testing. For a particular platform, one might want to test for
|
||||
XCOMM the presence of X11R5 or the OS version, for example, before allowing
|
||||
XCOMM the desktop to be installed.
|
||||
XCOMM
|
||||
XCOMM Declare this function to make such platform specific tests. Return
|
||||
XCOMM "yes" if the system passed, or "<message text>" if the system failed
|
||||
XCOMM in which case install.dt will display the <message text> as the reason.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM "yes" - system configuration verified
|
||||
XCOMM "<message text>" - verification failed, display message text
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiVerifyConfiguration()
|
||||
{
|
||||
if [ "$(uname -s)" = UNIX_System_V -a "$(uname -r)" = 4.2.0 ]
|
||||
then
|
||||
DtiReturn "yes"
|
||||
|
||||
HASH if [ "$(uname -v)" = 1.0 ]
|
||||
HASH then
|
||||
HASH DtiReturn "WARNING: THE CDE DESKTOP IS NOT SUPPORTED ON UnixWare 1.0"
|
||||
HASH else
|
||||
HASH for all 4.2 releases after 1.0
|
||||
HASH DtiReturn "yes"
|
||||
HASH fi
|
||||
else
|
||||
DtiReturn "ERROR: THIS IS NOT A \"UNIX_System_V 4.2.0\" SYSTEM"
|
||||
fi
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiWhoami
|
||||
XCOMM
|
||||
XCOMM The default DtiWhoami() uses the 'whoami' command to determine
|
||||
XCOMM the user name. If this platform does not have the 'whoami' command,
|
||||
XCOMM declare DtiWhoami() here with the appropriate functionality.
|
||||
XCOMM
|
||||
XCOMM Input - none
|
||||
XCOMM Output - none
|
||||
XCOMM Return
|
||||
XCOMM result of system 'whoami' command
|
||||
XCOMM
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiWhoami()
|
||||
{
|
||||
/usr/ucb/whoami
|
||||
}
|
||||
|
||||
XCOMM ==========================================================================
|
||||
XCOMM
|
||||
XCOMM DtiPrint - echo to stderr and log
|
||||
XCOMM
|
||||
XCOMM Input
|
||||
XCOMM $1 - data to echo to stdout and log
|
||||
XCOMM Output - none
|
||||
XCOMM Return -none
|
||||
XCOMM
|
||||
XCOMM Override on UnixWare because of printf "%s" integer-const problem
|
||||
XCOMM This coordinates with the leading blank in the passing of " $meg" in master.
|
||||
XCOMM ==========================================================================
|
||||
|
||||
DtiPrint()
|
||||
{
|
||||
if [ "$#" -gt 1 ]
|
||||
then
|
||||
if [ "$#" -gt 5 ]
|
||||
then
|
||||
printf "$1" "$2" "$3" "$4" "$5" "$6" $7 $8 $9 >&2
|
||||
else
|
||||
if [ "$#" -gt 4 ]
|
||||
then
|
||||
printf "$1" "$2" "$3" "$4" "$5" $6 $7 $8 $9 >&2
|
||||
else
|
||||
printf "$1" "$2" $3 $4 $5 $6 $7 $8 $9 >&2
|
||||
fi
|
||||
fi
|
||||
else
|
||||
printf "$1" $2 $3 $4 $5 $6 $7 $8 $9 >&2
|
||||
fi
|
||||
Log "$1" $2 $3 $4 $5 $6 $7 $8 $9
|
||||
}
|
||||
164
cde/admin/IntegTools/post_install/Imakefile
Normal file
164
cde/admin/IntegTools/post_install/Imakefile
Normal 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
|
||||
4
cde/admin/IntegTools/post_install/build_udb_list
Executable file
4
cde/admin/IntegTools/post_install/build_udb_list
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/ksh
|
||||
|
||||
awk '{if ($1 == "install_target" && $3 != "") print $3}' \
|
||||
$2/databases/$1.udb >$1.list
|
||||
93
cde/admin/IntegTools/post_install/configDemos.src
Executable file
93
cde/admin/IntegTools/post_install/configDemos.src
Executable 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
|
||||
|
||||
90
cde/admin/IntegTools/post_install/configFonts.src
Executable file
90
cde/admin/IntegTools/post_install/configFonts.src
Executable 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
|
||||
|
||||
90
cde/admin/IntegTools/post_install/configHelp.src
Executable file
90
cde/admin/IntegTools/post_install/configHelp.src
Executable 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
|
||||
|
||||
87
cde/admin/IntegTools/post_install/configHelpPrg.src
Executable file
87
cde/admin/IntegTools/post_install/configHelpPrg.src
Executable 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
|
||||
|
||||
89
cde/admin/IntegTools/post_install/configHelpRun.src
Executable file
89
cde/admin/IntegTools/post_install/configHelpRun.src
Executable 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
|
||||
|
||||
89
cde/admin/IntegTools/post_install/configIcons.src
Executable file
89
cde/admin/IntegTools/post_install/configIcons.src
Executable 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
|
||||
|
||||
89
cde/admin/IntegTools/post_install/configInc.src
Executable file
89
cde/admin/IntegTools/post_install/configInc.src
Executable 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
|
||||
|
||||
99
cde/admin/IntegTools/post_install/configLang.src
Executable file
99
cde/admin/IntegTools/post_install/configLang.src
Executable 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
|
||||
89
cde/admin/IntegTools/post_install/configMan.src
Executable file
89
cde/admin/IntegTools/post_install/configMan.src
Executable 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
|
||||
|
||||
100
cde/admin/IntegTools/post_install/configManDev.src
Executable file
100
cde/admin/IntegTools/post_install/configManDev.src
Executable 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
|
||||
|
||||
87
cde/admin/IntegTools/post_install/configMin.src
Executable file
87
cde/admin/IntegTools/post_install/configMin.src
Executable 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
|
||||
89
cde/admin/IntegTools/post_install/configMsgCat.src
Executable file
89
cde/admin/IntegTools/post_install/configMsgCat.src
Executable 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
|
||||
|
||||
89
cde/admin/IntegTools/post_install/configPrg.src
Executable file
89
cde/admin/IntegTools/post_install/configPrg.src
Executable 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
|
||||
|
||||
193
cde/admin/IntegTools/post_install/configRun.src
Executable file
193
cde/admin/IntegTools/post_install/configRun.src
Executable 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
|
||||
|
||||
88
cde/admin/IntegTools/post_install/configShlibs.src
Executable file
88
cde/admin/IntegTools/post_install/configShlibs.src
Executable 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
|
||||
|
||||
26
cde/admin/IntegTools/post_install/configTT.src
Executable file
26
cde/admin/IntegTools/post_install/configTT.src
Executable 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
|
||||
59
cde/admin/IntegTools/post_install/dec/Imakefile
Normal file
59
cde/admin/IntegTools/post_install/dec/Imakefile
Normal 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
|
||||
236
cde/admin/IntegTools/post_install/dec/configMin.src
Normal file
236
cde/admin/IntegTools/post_install/dec/configMin.src
Normal 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
|
||||
438
cde/admin/IntegTools/post_install/dec/configRun.src
Normal file
438
cde/admin/IntegTools/post_install/dec/configRun.src
Normal 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
|
||||
166
cde/admin/IntegTools/post_install/dec/configShlibs.src
Normal file
166
cde/admin/IntegTools/post_install/dec/configShlibs.src
Normal 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
|
||||
|
||||
239
cde/admin/IntegTools/post_install/dec/configTT.src
Normal file
239
cde/admin/IntegTools/post_install/dec/configTT.src
Normal 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
|
||||
485
cde/admin/IntegTools/post_install/hp/configMin
Executable file
485
cde/admin/IntegTools/post_install/hp/configMin
Executable file
|
|
@ -0,0 +1,485 @@
|
|||
#! /bin/ksh
|
||||
########
|
||||
# Product: CDE
|
||||
# Fileset: CDE-MIN
|
||||
# configure
|
||||
# @(#) $XConsortium: configMin /main/1 1995/09/15 17:48:04 cde-hp $
|
||||
########
|
||||
#
|
||||
# (c) Copyright Hewlett-Packard Company, 1993
|
||||
#
|
||||
########
|
||||
|
||||
|
||||
|
||||
PRODUCT=CDE
|
||||
FILESET=CDE-MIN
|
||||
DT_TEMP_TOP=/var/dt
|
||||
retval=0
|
||||
hostname=`hostname`
|
||||
DO_CONFIGURATION=""
|
||||
|
||||
|
||||
CreateVarDtDirectory()
|
||||
{
|
||||
if [ -x /bin/getcontext ]
|
||||
then
|
||||
if [ `/bin/getcontext | awk '{print $1}'` != "standalone" ]
|
||||
then
|
||||
base=${DT_TEMP_TOP%/*}
|
||||
if [ ! -d $base ]
|
||||
then
|
||||
mkdir -p $base
|
||||
fi
|
||||
if [ ! -d $DT_TEMP_TOP ]
|
||||
then
|
||||
|
||||
exec 3< /etc/clusterconf
|
||||
oldIFS=$IFS
|
||||
IFS=:
|
||||
CONTEXT=""
|
||||
while read -u3 lanid node name id num1 num2
|
||||
do
|
||||
if [ "$name" != "" ]
|
||||
then
|
||||
CONTEXT="$CONTEXT -c $name"
|
||||
fi
|
||||
done
|
||||
IFS=$oldIFS
|
||||
exec 3<&-
|
||||
|
||||
mkdir -p $DT_TEMP_TOP
|
||||
makecdf $CONTEXT $DT_TEMP_TOP
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
FixEtcServices()
|
||||
{
|
||||
FILE="/etc/services"
|
||||
TMPFILE="/tmp/etc-services"
|
||||
|
||||
#
|
||||
# check for existence of /etc/services
|
||||
#
|
||||
|
||||
if [ ! -f $FILE ] # highly unlikely
|
||||
then
|
||||
echo "" >$FILE
|
||||
fi
|
||||
|
||||
#
|
||||
# see if it already exists
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
print $0 > "/tmp/dtspc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/dtspc-already-there ]
|
||||
then
|
||||
echo "dtspc\t6112/tcp\t#subprocess control" >>$FILE
|
||||
else
|
||||
rm /tmp/dtspc-already-there
|
||||
fi
|
||||
|
||||
#
|
||||
# remove legacy entries like dtspcd
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspcd" || $1 == "#dtspcd")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
}
|
||||
|
||||
UnfixEtcServices()
|
||||
{
|
||||
FILE="/etc/services"
|
||||
TMPFILE="/tmp/etc-services"
|
||||
|
||||
awk '{if ($1 == "dtspc" && $2 == "6112/tcp")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
FixInetdDotConf()
|
||||
{
|
||||
FILE="/etc/inetd.conf"
|
||||
TMPFILE="/tmp/inetd.conf.$$"
|
||||
|
||||
#
|
||||
# check for existence of /etc/inetd.conf
|
||||
#
|
||||
|
||||
if [ ! -f $FILE ] # highly unlikely
|
||||
then
|
||||
echo "" >$FILE
|
||||
fi
|
||||
|
||||
awk '{if ($1 == "dtspc" || $1 == "dtspcd" || $1 == "#dtspcd")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $FILE $FILE.old
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
DTSPCD=/usr/dt/bin/dtspcd
|
||||
|
||||
echo "dtspc stream tcp nowait root $DTSPCD $DTSPCD -mount_point $DTMOUNTPOINT" >>$FILE
|
||||
}
|
||||
|
||||
UnfixInetdDotConf()
|
||||
{
|
||||
FILE="/etc/inetd.conf"
|
||||
TMPFILE="/tmp/inetd.conf"
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
FixInetdDotSec()
|
||||
{
|
||||
FILE="/usr/adm/inetd.sec"
|
||||
TMPFILE="/tmp/new-inetd.sec"
|
||||
|
||||
#
|
||||
# check for existence of /usr/adm/inetd.sec
|
||||
#
|
||||
|
||||
if [ ! -f $FILE ] # highly unlikely
|
||||
then
|
||||
echo "" >$FILE
|
||||
fi
|
||||
|
||||
#
|
||||
# remove legacy entries
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspcd")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
#
|
||||
# see if it already exists
|
||||
#
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
print $0 > "/tmp/dtspc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/dtspc-already-there ]
|
||||
then
|
||||
echo "dtspc\tallow\t127.0.0.1\t$hostname" >>$FILE
|
||||
else
|
||||
status=`grep -q $hostname /tmp/dtspc-already-there`
|
||||
if [[ $status -ne 0 ]]
|
||||
then
|
||||
cat /tmp/dtspc-already-there >> $FILE
|
||||
awk -v hname=$hostname \
|
||||
'{if ($1 != "dtspc")
|
||||
print $0;
|
||||
else
|
||||
print $0 hname
|
||||
}' $FILE > $TMPFILE
|
||||
|
||||
mv $FILE ${FILE}.old
|
||||
mv $TMPFILE $FILE
|
||||
fi
|
||||
rm /tmp/dtspc-already-there
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
UnfixInetdDotSec()
|
||||
{
|
||||
FILE="/usr/adm/inetd.sec"
|
||||
TMPFILE="/tmp/new-inetd.sec"
|
||||
|
||||
awk '{if ($1 == "dtspc")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
RemoveMinFiles()
|
||||
{
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
rm -f $SRC
|
||||
dirname=${SRC%/*}
|
||||
if [ -d $dirname ]
|
||||
then
|
||||
cd $dirname
|
||||
while [ "$dirname" != "$CDE_TOP" ]
|
||||
do
|
||||
cd ..
|
||||
rmdir ${dirname##*/} >/dev/null 2>/dev/null
|
||||
dirname=${dirname%/*}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/copyright
|
||||
/usr/dt/lib/dtksh/DtFuncs.dtsh
|
||||
/usr/dt/bin/dtspcd
|
||||
/usr/dt/bin/dtappintegrate
|
||||
/usr/dt/bin/dtksh
|
||||
/usr/dt/bin/suid_exec
|
||||
/usr/dt/app-defaults/C/Dtksh
|
||||
/usr/dt/config/dtspcdenv
|
||||
/usr/dt/bin/dtexec
|
||||
EOF
|
||||
}
|
||||
|
||||
VerifyInstalledFiles()
|
||||
{
|
||||
echo "Status mode owner group filename"
|
||||
echo "-----------------------------------------"
|
||||
# exists correct correct correct /usr/dt/foo1
|
||||
# MISSING WRONG WRONG WRONG /usr/dt/foo2
|
||||
# exists the link is correct /usr/dt/link
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
if [ -L ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
touch /tmp/config-test
|
||||
chmod ${tokens[1]} /tmp/config-test
|
||||
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
|
||||
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
|
||||
|
||||
if [ "$tmpperms" = "$realperms" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
|
||||
|
||||
if [ "$owner" = "${tokens[4]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
group=`ls -l ${tokens[0]} | awk '{print $4}'`
|
||||
|
||||
if [ "$group" = "${tokens[5]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
|
||||
if [ "${tokens[2]}" = "$linkto" ]
|
||||
then
|
||||
echo " the link is correct \c"
|
||||
else
|
||||
echo " the link is WRONG \c"
|
||||
fi
|
||||
fi
|
||||
echo "${tokens[0]}"
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/copyright 0444 copyright file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/dtksh/DtFuncs.dtsh 0444 cde1/dtksh/DtFuncs.sh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtspcd 0555 cde1/dtspcd/dtspcd file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtappintegrate 0555 cde1/dtappintegrate/dtappintegrate file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtksh 0555 cde1/dtksh/dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/suid_exec 0555 cde1/dtksh/ksh93/bin/suid_exec file root bin di---- 378 cde_dt
|
||||
/usr/dt/app-defaults/C/Dtksh 0444 cde1/dtksh/Dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/config/dtspcdenv 0444 cde1/dtspcd/dtspcdenv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtexec 0555 cde1/dtexec/dtexec file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
}
|
||||
|
||||
ShowSize()
|
||||
{
|
||||
typeset -i total;
|
||||
let total=0
|
||||
|
||||
echo "Size\t\tfilename"
|
||||
echo "-----------------------------------------"
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
|
||||
echo "$filesize\t\t\c"
|
||||
echo "${tokens[0]}"
|
||||
let total=total+filesize
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/copyright 0444 copyright file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/dtksh/DtFuncs.dtsh 0444 cde1/dtksh/DtFuncs.sh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtspcd 0555 cde1/dtspcd/dtspcd file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtappintegrate 0555 cde1/dtappintegrate/dtappintegrate file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtksh 0555 cde1/dtksh/dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/suid_exec 0555 cde1/dtksh/ksh93/bin/suid_exec file root bin di---- 378 cde_dt
|
||||
/usr/dt/app-defaults/C/Dtksh 0444 cde1/dtksh/Dtksh file bin bin di---- 378 cde_dt
|
||||
/usr/dt/config/dtspcdenv 0444 cde1/dtspcd/dtspcdenv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/dtexec 0555 cde1/dtexec/dtexec file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
echo "Total fileset size is $total"
|
||||
}
|
||||
HandleOption()
|
||||
{
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-e) OPERATION="configure"
|
||||
shift;
|
||||
;;
|
||||
-d) OPERATION="deconfigure"
|
||||
shift;
|
||||
;;
|
||||
-v) OPERATION="verify"
|
||||
shift;
|
||||
;;
|
||||
-s) OPERATION="size"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Main body
|
||||
#
|
||||
#####################################################################
|
||||
|
||||
|
||||
HandleOption $*
|
||||
|
||||
if [ "$OPERATION" = "configure" ]
|
||||
then
|
||||
echo "Configuring for CDE-MIN"
|
||||
|
||||
FixEtcServices
|
||||
|
||||
#
|
||||
# source in /etc/src.sh to get the DTMOUNTPOINT value
|
||||
#
|
||||
|
||||
. /etc/src.sh
|
||||
|
||||
FixInetdDotConf
|
||||
|
||||
FixInetdDotSec
|
||||
|
||||
#
|
||||
# force inetd to reread its configuration file
|
||||
#
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
#
|
||||
# create the /var/dt/tmp directory for the dtspcd
|
||||
#
|
||||
|
||||
CreateVarDtDirectory
|
||||
|
||||
if [ ! -d /var/dt/tmp ]
|
||||
then
|
||||
mkdir -p /var/dt/tmp
|
||||
chmod -R 755 /var/dt/tmp
|
||||
fi
|
||||
|
||||
chmod 755 /usr/dt /etc/dt
|
||||
|
||||
elif [ "$OPERATION" = "deconfigure" ]
|
||||
then
|
||||
echo "de-Configuring CDE-MIN"
|
||||
|
||||
UnfixEtcServices
|
||||
|
||||
UnfixInetdDotConf
|
||||
|
||||
UnfixInetdDotSec
|
||||
|
||||
#
|
||||
# force inetd to reread its configuration file
|
||||
#
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
RemoveMinFiles
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "verify" ]
|
||||
then
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "size" ]
|
||||
then
|
||||
|
||||
ShowSize
|
||||
|
||||
fi
|
||||
|
||||
return $retval
|
||||
1006
cde/admin/IntegTools/post_install/hp/configRun
Executable file
1006
cde/admin/IntegTools/post_install/hp/configRun
Executable file
File diff suppressed because it is too large
Load diff
246
cde/admin/IntegTools/post_install/hp/configShlibs
Executable file
246
cde/admin/IntegTools/post_install/hp/configShlibs
Executable file
|
|
@ -0,0 +1,246 @@
|
|||
#! /bin/ksh
|
||||
########
|
||||
# Product: CDE
|
||||
# Fileset: CDE-SHLIBS
|
||||
# configure
|
||||
# $XConsortium: configShlibs /main/5 1996/06/13 15:47:42 drk $
|
||||
########
|
||||
#
|
||||
# (c) Copyright 1996 Digital Equipment Corporation.
|
||||
# (c) Copyright 1995,1996 Hewlett-Packard Company.
|
||||
# (c) Copyright 1996 International Business Machines Corp.
|
||||
# (c) Copyright 1996 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1996 Novell, Inc.
|
||||
# (c) Copyright 1996 FUJITSU LIMITED.
|
||||
# (c) Copyright 1996 Hitachi.
|
||||
#
|
||||
########
|
||||
|
||||
PROG_NAME=$0
|
||||
|
||||
CreateOneLink()
|
||||
{
|
||||
if [ -f $1.$2 ]; then
|
||||
rm -f $1
|
||||
ln -s $1.$2 $1
|
||||
else
|
||||
echo "$PROG_NAME: $1.$2 does not exist."
|
||||
echo " A symbolic link for this shared library will NOT be created."
|
||||
fi
|
||||
}
|
||||
|
||||
CreateSymLinks()
|
||||
{
|
||||
if [ -d /usr/dt/lib ]; then
|
||||
|
||||
cd /usr/dt/lib
|
||||
|
||||
CreateOneLink libDtHelp.sl 2.1
|
||||
CreateOneLink libDtPrint.sl 2.1
|
||||
CreateOneLink libDtMrm.sl 2.1
|
||||
CreateOneLink libDtSvc.sl 2.1
|
||||
CreateOneLink libDtWidget.sl 2.1
|
||||
CreateOneLink libDtTerm.sl 2.1
|
||||
CreateOneLink libtt.sl 2.1
|
||||
CreateOneLink libcsa.sl 2.1
|
||||
CreateOneLink libDtSearch.sl 2.1
|
||||
CreateOneLink libDtMmdb.sl 2.1
|
||||
|
||||
else
|
||||
echo "$PROG_NAME: /usr/dt/lib does not exist. Symbolic"
|
||||
echo " links for the shared libraries will NOT be created."
|
||||
fi
|
||||
}
|
||||
|
||||
VerifyInstalledFiles()
|
||||
{
|
||||
echo "Status mode owner group filename"
|
||||
echo "-----------------------------------------"
|
||||
# exists correct correct correct /usr/dt/foo1
|
||||
# MISSING WRONG WRONG WRONG /usr/dt/foo2
|
||||
# exists the link is correct /usr/dt/link
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
if [ -L ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
touch /tmp/config-test
|
||||
chmod ${tokens[1]} /tmp/config-test
|
||||
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
|
||||
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
|
||||
|
||||
if [ "$tmpperms" = "$realperms" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
|
||||
|
||||
if [ "$owner" = "${tokens[4]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
group=`ls -l ${tokens[0]} | awk '{print $4}'`
|
||||
|
||||
if [ "$group" = "${tokens[5]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
|
||||
if [ "${tokens[2]}" = "$linkto" ]
|
||||
then
|
||||
echo " the link is correct \c"
|
||||
else
|
||||
echo " the link is WRONG \c"
|
||||
fi
|
||||
fi
|
||||
echo "${tokens[0]}"
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib/libDtHelp.sl 0555 lib/DtHelp/libDtHelp.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtPrint.sl 0555 lib/DtPrint/libDtPrint.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMrm.sl 0555 lib/DtMrm/libDtMrm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSvc.sl 0555 lib/DtSvc/libDtSvc.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtWidget.sl 0555 lib/DtWidget/libDtWidget.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtTerm.sl 0555 lib/DtTerm/libDtTerm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libtt.sl 0555 lib/tt/lib/libtt.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libcsa.sl 0555 lib/csa/libcsa.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSearch.sl 0555 lib/DtSearch/libDtSearch.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMmdb.sl 0555 lib/DtMmdb/libDtMmdb.sl file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
}
|
||||
|
||||
ShowSize()
|
||||
{
|
||||
typeset -i total;
|
||||
let total=0
|
||||
|
||||
echo "Size\t\tfilename"
|
||||
echo "-----------------------------------------"
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
|
||||
echo "$filesize\t\t\c"
|
||||
echo "${tokens[0]}"
|
||||
let total=total+filesize
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib 0555 directory bin bin ------ 378 cde_dt
|
||||
/usr/dt/lib/libDtHelp.sl 0555 lib/DtHelp/libDtHelp.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtPrint.sl 0555 lib/DtPrint/libDtPrint.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMrm.sl 0555 lib/DtMrm/libDtMrm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSvc.sl 0555 lib/DtSvc/libDtSvc.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtWidget.sl 0555 lib/DtWidget/libDtWidget.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtTerm.sl 0555 lib/DtTerm/libDtTerm.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libtt.sl 0555 lib/tt/lib/libtt.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libcsa.sl 0555 lib/csa/libcsa.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtSearch.sl 0555 lib/DtSearch/libDtSearch.sl file bin bin di---- 378 cde_dt
|
||||
/usr/dt/lib/libDtMmdb.sl 0555 lib/DtMmdb/libDtMmdb.sl file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
echo "Total fileset size is $total"
|
||||
}
|
||||
HandleOption()
|
||||
{
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-e) OPERATION="configure"
|
||||
shift;
|
||||
;;
|
||||
-d) OPERATION="deconfigure"
|
||||
shift;
|
||||
;;
|
||||
-v) OPERATION="verify"
|
||||
shift;
|
||||
;;
|
||||
-s) OPERATION="size"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Main Body
|
||||
#
|
||||
#################################################################
|
||||
PRODUCT=CDE
|
||||
FILESET=CDE-SHLIBS
|
||||
retval=0
|
||||
|
||||
HandleOption $*
|
||||
|
||||
if [ "$OPERATION" = "configure" ]
|
||||
then
|
||||
|
||||
echo "Configuring for CDE-SHLIBS"
|
||||
|
||||
CreateSymLinks
|
||||
|
||||
elif [ "$OPERATION" = "deconfigure" ]
|
||||
then
|
||||
|
||||
echo "de-Configuring CDE-SHLIBS NOT supported!"
|
||||
|
||||
elif [ "$OPERATION" = "verify" ]
|
||||
then
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "size" ]
|
||||
then
|
||||
|
||||
ShowSize
|
||||
|
||||
fi
|
||||
|
||||
return $retval
|
||||
441
cde/admin/IntegTools/post_install/hp/configTT
Executable file
441
cde/admin/IntegTools/post_install/hp/configTT
Executable file
|
|
@ -0,0 +1,441 @@
|
|||
#! /bin/ksh
|
||||
########
|
||||
# Product: CDE
|
||||
# Fileset: CDE-TT
|
||||
# configure
|
||||
# @(#) $XConsortium: configTT /main/2 1996/03/06 19:09:08 barstow $
|
||||
########
|
||||
#
|
||||
# (c) Copyright Hewlett-Packard Company, 1993
|
||||
#
|
||||
########
|
||||
|
||||
|
||||
|
||||
FixInetdDotConf()
|
||||
{
|
||||
FILE=/etc/inetd.conf
|
||||
TMPFILE=/tmp/inetd.conf
|
||||
|
||||
TTDBSERVERD=/usr/dt/bin/rpc.ttdbserver
|
||||
OLDTTDBSERVERD=/usr/dt/bin/rpc.ttdbserverd
|
||||
|
||||
awk -v ttdb=$TTDBSERVERD -v oldttdb=$OLDTTDBSERVERD '{
|
||||
if ($6 == ttdb || $6 == oldttdb)
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $FILE $FILE.old
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
echo "rpc stream tcp swait root $TTDBSERVERD 100083 1 $TTDBSERVERD -m /nfs/" >>$FILE
|
||||
}
|
||||
|
||||
|
||||
UnfixInetdDotConf()
|
||||
{
|
||||
FILE="/etc/inetd.conf"
|
||||
TMPFILE="/tmp/inetd.conf"
|
||||
TTDBSERVERD=/usr/dt/bin/rpc.ttdbserver
|
||||
|
||||
awk -v ttdb=$TTDBSERVERD \
|
||||
'{if ($7 == "100083" && $6 == ttdb)
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
awk '{if ($1 == "#cde") {
|
||||
$1 = $2;
|
||||
$2 = ""
|
||||
}
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
|
||||
FixEtcRpc()
|
||||
{
|
||||
FILE=/etc/rpc
|
||||
TMPFILE=/tmp/etc-rpc
|
||||
|
||||
if [ ! -f $FILE ]
|
||||
then
|
||||
echo "ttdbserver 100083" >$FILE
|
||||
else
|
||||
awk '{if ($1 == "ttdbserver" && $2 == "100083")
|
||||
print $0 > "/tmp/etc-rpc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/etc-rpc-already-there ]
|
||||
then
|
||||
awk '{if ($1 == "ttdbserver" || $2 == "100083")
|
||||
print $0 > "/tmp/etc-rpc-already-there"
|
||||
}' $FILE >/dev/null
|
||||
|
||||
if [ ! -f /tmp/etc-rpc-already-there ]
|
||||
then
|
||||
echo "ttdbserver 100083" >>$FILE
|
||||
else
|
||||
awk '{if ($1 == "ttdbserver" || $2 == "100083")
|
||||
print "#cde " $0; else print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
echo "ttdbserver 100083" >>$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
rm /tmp/etc-rpc-already-there
|
||||
fi
|
||||
else
|
||||
rm /tmp/etc-rpc-already-there
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
UnfixEtcRpc()
|
||||
{
|
||||
FILE="/etc/rpc"
|
||||
TMPFILE="/tmp/etc-rpc"
|
||||
|
||||
awk '{if ($1 == "ttdbserver" && $2 == "100083")
|
||||
;
|
||||
else
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
|
||||
awk '{if ($1 == "#cde") {
|
||||
$1 = $2;
|
||||
$2 = ""
|
||||
}
|
||||
print $0
|
||||
}' $FILE >$TMPFILE
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
}
|
||||
|
||||
EstablishDtMountPoint()
|
||||
{
|
||||
FILE="/etc/src.sh"
|
||||
TMPFILE="/tmp/etcsrcsh.$$"
|
||||
|
||||
#
|
||||
# Ensure that the DTMOUNTPOINT environment variable will be set
|
||||
# when anybody logs in.
|
||||
#
|
||||
|
||||
if [[ -d /nfs && ! -d /net ]]
|
||||
then
|
||||
sed '/DTMOUNTPOINT=/d' $FILE >$TMPFILE
|
||||
|
||||
echo "DTMOUNTPOINT=/nfs/ ; export DTMOUNTPOINT" >>$TMPFILE
|
||||
|
||||
if [ ! -f ${FILE}.pre-cde ]
|
||||
then
|
||||
mv $FILE ${FILE}.pre-cde
|
||||
fi
|
||||
|
||||
mv $TMPFILE $FILE
|
||||
fi
|
||||
}
|
||||
|
||||
DeestablishDtMountPoint()
|
||||
{
|
||||
FILE="/etc/src.sh"
|
||||
TMPFILE="/tmp/etc-src.sh"
|
||||
|
||||
if [ -f ${FILE}.pre-cde ]
|
||||
then
|
||||
mv ${FILE}.pre-cde $FILE
|
||||
else
|
||||
sed '/DTMOUNTPOINT=/d' $FILE >$TMPFILE
|
||||
mv $TMPFILE $FILE
|
||||
fi
|
||||
}
|
||||
|
||||
KillIt()
|
||||
{
|
||||
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
|
||||
if [ -s /tmp/tmppsout ]
|
||||
then
|
||||
awk '{print "kill " $2}' /tmp/tmppsout | /bin/ksh
|
||||
sleep 2
|
||||
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
|
||||
if [ -s /tmp/tmppsout ]
|
||||
then
|
||||
awk '{print "kill -TERM " $2}' /tmp/tmppsout | /bin/ksh
|
||||
sleep 2
|
||||
ps -ef | fgrep $1 | grep -v grep >/tmp/tmppsout
|
||||
if [ -s /tmp/tmppsout ]
|
||||
then
|
||||
awk '{print "kill -9 " $2}' /tmp/tmppsout | /bin/ksh
|
||||
sleep 2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm /tmp/tmppsout
|
||||
}
|
||||
|
||||
RemoveTTFiles()
|
||||
{
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
rm -f $SRC
|
||||
dirname=${SRC%/*}
|
||||
if [ -d $dirname ]
|
||||
then
|
||||
cd $dirname
|
||||
while [ "$dirname" != "$CDE_TOP" ]
|
||||
do
|
||||
cd ..
|
||||
rmdir ${dirname##*/} >/dev/null 2>/dev/null
|
||||
dirname=${dirname%/*}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/bin/rpc.ttdbserver
|
||||
/usr/dt/bin/rpc.ttdbserverd
|
||||
/usr/dt/bin/rpc.ttdbserverd
|
||||
/usr/dt/bin/tt_type_comp
|
||||
/usr/dt/bin/ttcp
|
||||
/usr/dt/bin/ttdbck
|
||||
/usr/dt/bin/ttmv
|
||||
/usr/dt/bin/ttrm
|
||||
/usr/dt/bin/ttrmdir
|
||||
/usr/dt/bin/ttsession
|
||||
/usr/dt/bin/tttrace
|
||||
/usr/dt/bin/tttar
|
||||
/usr/dt/bin/ttsnoop
|
||||
/usr/dt/lib/libtt.a
|
||||
/usr/dt/appconfig/tttypes/types.xdr
|
||||
EOF
|
||||
}
|
||||
|
||||
VerifyInstalledFiles()
|
||||
{
|
||||
echo "Status mode owner group filename"
|
||||
echo "-----------------------------------------"
|
||||
# exists correct correct correct /usr/dt/foo1
|
||||
# MISSING WRONG WRONG WRONG /usr/dt/foo2
|
||||
# exists the link is correct /usr/dt/link
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
if [ -L ${tokens[0]} ]
|
||||
then
|
||||
echo "exists \c"
|
||||
else
|
||||
echo "MISSING or REMOVED \c"
|
||||
echo "${tokens[0]}"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
touch /tmp/config-test
|
||||
chmod ${tokens[1]} /tmp/config-test
|
||||
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
|
||||
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
|
||||
|
||||
if [ "$tmpperms" = "$realperms" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
|
||||
|
||||
if [ "$owner" = "${tokens[4]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
|
||||
group=`ls -l ${tokens[0]} | awk '{print $4}'`
|
||||
|
||||
if [ "$group" = "${tokens[5]}" ]
|
||||
then
|
||||
echo "correct \c"
|
||||
else
|
||||
echo " WRONG \c"
|
||||
fi
|
||||
elif [ "${tokens[3]}" = "sym_link" ]
|
||||
then
|
||||
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
|
||||
if [ "${tokens[2]}" = "$linkto" ]
|
||||
then
|
||||
echo " the link is correct \c"
|
||||
else
|
||||
echo " the link is WRONG \c"
|
||||
fi
|
||||
fi
|
||||
echo "${tokens[0]}"
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/bin/rpc.ttdbserver 0555 lib/tt/bin/ttdbserverd/rpc.ttdbserver file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tt_type_comp 0555 lib/tt/bin/tt_type_comp/tt_type_comp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttcp 0555 lib/tt/bin/shell/ttcp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttdbck 0555 lib/tt/bin/dbck/ttdbck file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttmv 0555 lib/tt/bin/shell/ttmv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrm 0555 lib/tt/bin/shell/ttrm file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrmdir 0444 /usr/dt/bin/ttrm sym_link bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsession 0555 lib/tt/bin/ttsession/ttsession file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttrace 0555 lib/tt/bin/tttrace/tttrace file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttar 0555 lib/tt/bin/tttar/tttar file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsnoop 0555 lib/tt/bin/ttsnoop/gui/ttsnoop file bin bin di---- 378 cde_dt
|
||||
/usr/dt/appconfig/tttypes/types.xdr 0444 cde1/tttypes/types.xdr file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
}
|
||||
|
||||
ShowSize()
|
||||
{
|
||||
typeset -i total;
|
||||
let total=0
|
||||
|
||||
echo "Size\t\tfilename"
|
||||
echo "-----------------------------------------"
|
||||
|
||||
while read SRC
|
||||
do
|
||||
if [ "$SRC" != "" ]
|
||||
then
|
||||
set -A tokens $SRC
|
||||
if [ "${tokens[3]}" = "file" ]
|
||||
then
|
||||
if [ -f ${tokens[0]} ]
|
||||
then
|
||||
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
|
||||
echo "$filesize\t\t\c"
|
||||
echo "${tokens[0]}"
|
||||
let total=total+filesize
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done <<-EOF
|
||||
/usr/dt/bin/rpc.ttdbserver 0555 lib/tt/bin/ttdbserverd/rpc.ttdbserver file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tt_type_comp 0555 lib/tt/bin/tt_type_comp/tt_type_comp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttcp 0555 lib/tt/bin/shell/ttcp file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttdbck 0555 lib/tt/bin/dbck/ttdbck file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttmv 0555 lib/tt/bin/shell/ttmv file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrm 0555 lib/tt/bin/shell/ttrm file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttrmdir 0444 /usr/dt/bin/ttrm sym_link bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsession 0555 lib/tt/bin/ttsession/ttsession file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttrace 0555 lib/tt/bin/tttrace/tttrace file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/tttar 0555 lib/tt/bin/tttar/tttar file bin bin di---- 378 cde_dt
|
||||
/usr/dt/bin/ttsnoop 0555 lib/tt/bin/ttsnoop/gui/ttsnoop file bin bin di---- 378 cde_dt
|
||||
/usr/dt/appconfig/tttypes/types.xdr 0444 cde1/tttypes/types.xdr file bin bin di---- 378 cde_dt
|
||||
EOF
|
||||
echo "Total fileset size is $total"
|
||||
}
|
||||
HandleOption()
|
||||
{
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-e) OPERATION="configure"
|
||||
shift;
|
||||
;;
|
||||
-d) OPERATION="deconfigure"
|
||||
shift;
|
||||
;;
|
||||
-v) OPERATION="verify"
|
||||
shift;
|
||||
;;
|
||||
-s) OPERATION="size"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Main Body
|
||||
#
|
||||
#################################################################
|
||||
PRODUCT=CDE
|
||||
FILESET=CDE-TT
|
||||
retval=0
|
||||
|
||||
HandleOption $*
|
||||
|
||||
if [ "$OPERATION" = "configure" ]
|
||||
then
|
||||
|
||||
echo "Configuring for CDE-TT"
|
||||
|
||||
FixInetdDotConf
|
||||
|
||||
FixEtcRpc
|
||||
|
||||
# After adding ToolTalk to the inetd service list the inet
|
||||
# daemon needs to reread its configuration.
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
EstablishDtMountPoint
|
||||
|
||||
elif [ "$OPERATION" = "deconfigure" ]
|
||||
then
|
||||
|
||||
echo "de-Configuring CDE-TT"
|
||||
|
||||
/etc/inetd -k
|
||||
KillIt "rpc.ttdbserver"
|
||||
/etc/inetd
|
||||
|
||||
UnfixInetdDotConf
|
||||
|
||||
UnfixEtcRpc
|
||||
|
||||
# After adding ToolTalk to the inetd service list the inet
|
||||
# daemon needs to reread its configuration.
|
||||
|
||||
/etc/inetd -c
|
||||
|
||||
DeestablishDtMountPoint
|
||||
|
||||
RemoveTTFiles
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "verify" ]
|
||||
then
|
||||
|
||||
VerifyInstalledFiles
|
||||
|
||||
elif [ "$OPERATION" = "size" ]
|
||||
then
|
||||
|
||||
ShowSize
|
||||
|
||||
fi
|
||||
|
||||
return $retval
|
||||
52
cde/admin/IntegTools/post_install/ibm/Imakefile
Normal file
52
cde/admin/IntegTools/post_install/ibm/Imakefile
Normal 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
|
||||
265
cde/admin/IntegTools/post_install/ibm/configMin.src
Executable file
265
cde/admin/IntegTools/post_install/ibm/configMin.src
Executable 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
|
||||
661
cde/admin/IntegTools/post_install/ibm/configRun.src
Executable file
661
cde/admin/IntegTools/post_install/ibm/configRun.src
Executable 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
|
||||
291
cde/admin/IntegTools/post_install/ibm/configTT.src
Executable file
291
cde/admin/IntegTools/post_install/ibm/configTT.src
Executable 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
|
||||
59
cde/admin/IntegTools/post_install/linux/Imakefile
Normal file
59
cde/admin/IntegTools/post_install/linux/Imakefile
Normal 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
|
||||
275
cde/admin/IntegTools/post_install/linux/configMin.src
Executable file
275
cde/admin/IntegTools/post_install/linux/configMin.src
Executable 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
|
||||
322
cde/admin/IntegTools/post_install/linux/configRun.src
Executable file
322
cde/admin/IntegTools/post_install/linux/configRun.src
Executable 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
|
||||
105
cde/admin/IntegTools/post_install/linux/configShlibs.src
Executable file
105
cde/admin/IntegTools/post_install/linux/configShlibs.src
Executable 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
|
||||
166
cde/admin/IntegTools/post_install/linux/configTT.src
Executable file
166
cde/admin/IntegTools/post_install/linux/configTT.src
Executable 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
|
||||
20
cde/admin/IntegTools/post_install/option.func
Normal file
20
cde/admin/IntegTools/post_install/option.func
Normal 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
|
||||
}
|
||||
|
||||
14
cde/admin/IntegTools/post_install/size.func
Normal file
14
cde/admin/IntegTools/post_install/size.func
Normal 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
|
||||
56
cde/admin/IntegTools/post_install/sun/Imakefile
Normal file
56
cde/admin/IntegTools/post_install/sun/Imakefile
Normal 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
|
||||
275
cde/admin/IntegTools/post_install/sun/configMin.src
Executable file
275
cde/admin/IntegTools/post_install/sun/configMin.src
Executable 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
|
||||
322
cde/admin/IntegTools/post_install/sun/configRun.src
Executable file
322
cde/admin/IntegTools/post_install/sun/configRun.src
Executable 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
|
||||
105
cde/admin/IntegTools/post_install/sun/configShlibs.src
Executable file
105
cde/admin/IntegTools/post_install/sun/configShlibs.src
Executable 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
|
||||
166
cde/admin/IntegTools/post_install/sun/configTT.src
Executable file
166
cde/admin/IntegTools/post_install/sun/configTT.src
Executable 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
|
||||
57
cde/admin/IntegTools/post_install/usl/Imakefile
Normal file
57
cde/admin/IntegTools/post_install/usl/Imakefile
Normal 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
|
||||
53
cde/admin/IntegTools/post_install/usl/S69xdm
Normal file
53
cde/admin/IntegTools/post_install/usl/S69xdm
Normal 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
|
||||
|
||||
67
cde/admin/IntegTools/post_install/usl/configHelp.src
Executable file
67
cde/admin/IntegTools/post_install/usl/configHelp.src
Executable 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
|
||||
|
||||
65
cde/admin/IntegTools/post_install/usl/configHelpPrg.src
Executable file
65
cde/admin/IntegTools/post_install/usl/configHelpPrg.src
Executable 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
|
||||
|
||||
197
cde/admin/IntegTools/post_install/usl/configMin.src
Normal file
197
cde/admin/IntegTools/post_install/usl/configMin.src
Normal 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
|
||||
|
||||
306
cde/admin/IntegTools/post_install/usl/configRun.src
Normal file
306
cde/admin/IntegTools/post_install/usl/configRun.src
Normal 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
|
||||
114
cde/admin/IntegTools/post_install/usl/configShlibs.src
Executable file
114
cde/admin/IntegTools/post_install/usl/configShlibs.src
Executable 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
|
||||
101
cde/admin/IntegTools/post_install/usl/configTT.src
Normal file
101
cde/admin/IntegTools/post_install/usl/configTT.src
Normal 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
|
||||
55
cde/admin/IntegTools/post_install/uxp/Imakefile
Normal file
55
cde/admin/IntegTools/post_install/uxp/Imakefile
Normal 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
|
||||
53
cde/admin/IntegTools/post_install/uxp/S69xdm
Normal file
53
cde/admin/IntegTools/post_install/uxp/S69xdm
Normal 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
|
||||
|
||||
67
cde/admin/IntegTools/post_install/uxp/configHelp.src
Normal file
67
cde/admin/IntegTools/post_install/uxp/configHelp.src
Normal 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
|
||||
|
||||
65
cde/admin/IntegTools/post_install/uxp/configHelpPrg.src
Normal file
65
cde/admin/IntegTools/post_install/uxp/configHelpPrg.src
Normal 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
|
||||
|
||||
197
cde/admin/IntegTools/post_install/uxp/configMin.src
Normal file
197
cde/admin/IntegTools/post_install/uxp/configMin.src
Normal 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
|
||||
|
||||
306
cde/admin/IntegTools/post_install/uxp/configRun.src
Normal file
306
cde/admin/IntegTools/post_install/uxp/configRun.src
Normal 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
|
||||
114
cde/admin/IntegTools/post_install/uxp/configShlibs.src
Normal file
114
cde/admin/IntegTools/post_install/uxp/configShlibs.src
Normal 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
|
||||
166
cde/admin/IntegTools/post_install/uxp/configTT.src
Normal file
166
cde/admin/IntegTools/post_install/uxp/configTT.src
Normal 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
|
||||
68
cde/admin/IntegTools/post_install/verify.func
Normal file
68
cde/admin/IntegTools/post_install/verify.func
Normal 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
|
||||
10
cde/admin/IntegTools/updateTools/Imakefile
Normal file
10
cde/admin/IntegTools/updateTools/Imakefile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:08:02 drk $
|
||||
|
||||
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
|
||||
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
|
||||
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
|
||||
-Usun
|
||||
|
||||
AllTarget(updateCDE)
|
||||
|
||||
CppScriptTarget(updateCDE,updateCDE.src,$(LOCAL_CPP_DEFINES),)
|
||||
42
cde/admin/IntegTools/updateTools/kfork
Executable file
42
cde/admin/IntegTools/updateTools/kfork
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#! /bin/ksh
|
||||
#
|
||||
# Shell script to kill off specified processes
|
||||
#
|
||||
# Usage: kfork <process-to-kill> <waiting time before retry>
|
||||
|
||||
# check for the optional 3rd parameter
|
||||
# it will tell how long to wait before
|
||||
# the next kill attempt
|
||||
if [ $# -ge 2 ]
|
||||
then
|
||||
die_time=$2
|
||||
else
|
||||
die_time=1
|
||||
fi
|
||||
|
||||
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
|
||||
if [ -s /tmp/tmp.$$ ]
|
||||
then
|
||||
awk '{print "kill", $1}' /tmp/tmp.$$ | /bin/csh
|
||||
sleep $die_time # wait for it to die
|
||||
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
|
||||
if [ -s /tmp/tmp.$$ ]
|
||||
then
|
||||
awk '{print "kill -3", $1}' /tmp/tmp.$$ | /bin/csh
|
||||
sleep $die_time # wait for it to die
|
||||
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
|
||||
if [ -s /tmp/tmp.$$ ]
|
||||
then
|
||||
awk '{print "kill -9", $1}' /tmp/tmp.$$ | /bin/csh
|
||||
fi
|
||||
rm /tmp/tmp.$$
|
||||
fi
|
||||
if [ -f /tmp/tmp.$$ ]
|
||||
then
|
||||
rm /tmp/tmp.$$
|
||||
fi
|
||||
fi
|
||||
if [ -f /tmp/tmp.$$ ]
|
||||
then
|
||||
rm /tmp/tmp.$$
|
||||
fi
|
||||
77
cde/admin/IntegTools/updateTools/kfork.dtclients
Executable file
77
cde/admin/IntegTools/updateTools/kfork.dtclients
Executable file
|
|
@ -0,0 +1,77 @@
|
|||
#!/bin/ksh
|
||||
#
|
||||
# Shell script to use kfork to kill all the desktop clients prior to
|
||||
# a clean install of new bits.
|
||||
#
|
||||
# Author: Jerrie Andreas 10/5/93
|
||||
#
|
||||
# Usage: No parameters, called from updateDT
|
||||
|
||||
|
||||
PS_ALL_FLAG=-e
|
||||
export PS_ALL_FLAG
|
||||
|
||||
TOOL_DIR=/x/cdesrc/admin/IntegTools/updateTools
|
||||
export TOOL_DIR
|
||||
|
||||
die_time=3
|
||||
|
||||
files="
|
||||
dtaction
|
||||
dtappgather
|
||||
dtappintegrate
|
||||
dtcalc
|
||||
dtcm
|
||||
dtcopy
|
||||
dtcreate
|
||||
dterror
|
||||
dtexec
|
||||
dtfile
|
||||
dtgreet
|
||||
dthello
|
||||
dthelpgen
|
||||
dthelptag
|
||||
dthelpview
|
||||
dticon
|
||||
dtksh
|
||||
dtlogin
|
||||
dtlpsetup
|
||||
dtmail
|
||||
dtmailconv
|
||||
dtpad
|
||||
dtprintegrate
|
||||
dtqueueinfo
|
||||
dtrc
|
||||
dtscreen
|
||||
dtsearchpath
|
||||
dtsession
|
||||
dtspcd
|
||||
dtstyle
|
||||
dtterm
|
||||
dtwm
|
||||
htag1
|
||||
htag2
|
||||
inetd
|
||||
list_queue_jobs
|
||||
list_queues
|
||||
rpc.cmsd
|
||||
rpc.ttdbserverd
|
||||
tt_type_comp
|
||||
ttcp
|
||||
ttdbck
|
||||
ttmv
|
||||
ttrm
|
||||
ttsession
|
||||
ttsnoop
|
||||
tttar
|
||||
tttrace
|
||||
uil
|
||||
"
|
||||
|
||||
for file in $files
|
||||
do
|
||||
$TOOL_DIR/kfork $file $die_time
|
||||
done
|
||||
|
||||
|
||||
|
||||
92
cde/admin/IntegTools/updateTools/updateCDE.ez
Executable file
92
cde/admin/IntegTools/updateTools/updateCDE.ez
Executable file
|
|
@ -0,0 +1,92 @@
|
|||
#!/bin/ksh
|
||||
#
|
||||
# updateCDE.ez
|
||||
#
|
||||
# Author:
|
||||
#
|
||||
# This script invokes the updateCDE script to do the actual work.
|
||||
# updateCDE.ez passes the path for the source tree to updateCDE and
|
||||
# thus to installCDE.
|
||||
#
|
||||
# Usage: updateCDE.ez -p <platform: hp|hpsh|ibm|sun>
|
||||
# or updateCDE.ez -p <platform> [-t <tarball destination directory>]
|
||||
#
|
||||
# Example: updateCDE.ez -p hp
|
||||
# updateCDE.ez -p hp -t /x/cde.save.tar
|
||||
|
||||
USAGE="Usage: updateCDE.ez -p <platform: hp|hpsh|ibm|sun> [-t <tarball location>]"
|
||||
PLATFORM=""
|
||||
TARBALL="no"
|
||||
PASS_THRUS=""
|
||||
|
||||
while [ $# -ne 0 ]; do
|
||||
case $1 in
|
||||
-p) echo "get the platform"
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
echo $USAGE
|
||||
exit 1;
|
||||
}
|
||||
PLATFORM=$1
|
||||
shift;
|
||||
;;
|
||||
-t) echo "Where to put the tarball if "
|
||||
shift;
|
||||
[ $# -ne 0 ] || {
|
||||
echo $USAGE
|
||||
exit 1;
|
||||
}
|
||||
TARBALL="yes"
|
||||
TARBALL_LOCATION=$1
|
||||
shift;
|
||||
;;
|
||||
*) PASS_THRUS="$PASS_THRUS $1"
|
||||
shift;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$PLATFORM" = "" ]
|
||||
then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
UPDATE=admin/IntegTools/updateTools/updateCDE
|
||||
|
||||
case $PLATFORM in
|
||||
hp) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_hp700_90/$UPDATE -s /x/cde_hp700_90 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
echo "/x/cde_hp700_90/$UPDATE -s /x/cde_hp700_90 $PASS_THRUS"
|
||||
/x/cde_hp700_90/$UPDATE -s /x/cde_hp700_90 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
hpsh) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_hp700_sh_90/$UPDATE -s /x/cde_hp700_sh_90 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
echo "/x/cde_hp700_sh_90/$UPDATE -s /x/cde_hp700_sh_90 $PASS_THRUS"
|
||||
/x/cde_hp700_sh_90/$UPDATE -s /x/cde_hp700_sh_90 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
sun) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_sun_52/$UPDATE -s /x/cde_sun_52 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
/x/cde_sun_52/$UPDATE -s /x/cde_sun_52 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
ibm) if [ "$TARBALL" = "yes" ]
|
||||
then
|
||||
/x/cde_aix_32/$UPDATE -s /x/cde_aix_32 -t $TARBALL_LOCATION \
|
||||
$PASS_THRUS
|
||||
else
|
||||
/x/cde_aix_32/$UPDATE -s /x/cde_aix_32 $PASS_THRUS
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
129
cde/admin/IntegTools/updateTools/updateCDE.src
Executable file
129
cde/admin/IntegTools/updateTools/updateCDE.src
Executable file
|
|
@ -0,0 +1,129 @@
|
|||
XCOMM! /bin/ksh
|
||||
XCOMM $XConsortium: updateCDE.src /main/6 1996/04/23 11:10:35 drk $
|
||||
XCOMM
|
||||
XCOMM updateCDE or updateCDE.and.stomp.current.bits
|
||||
XCOMM
|
||||
XCOMM Jerrie Andreas 10/5/93
|
||||
XCOMM
|
||||
XCOMM This script kills any desktop "dt" clients that are currently running,
|
||||
XCOMM and then calls installCDE to install bits, passing all parameters to
|
||||
XCOMM installCDE. It then (on hp systems) changes run level to 5, the default
|
||||
XCOMM run level for starting the desktop.
|
||||
XCOMM
|
||||
XCOMM This script uses the same options as installCDE.
|
||||
XCOMM
|
||||
XCOMM Example: updateCDE -s /x/cde_hp700_90 -t /x/cde_savetars
|
||||
XCOMM
|
||||
XCOMM #########################################################################
|
||||
|
||||
#define HASH #
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Usage: updateCDE -s <source> [options]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" != "-s" ]
|
||||
then
|
||||
echo "First argument must be the -s option."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOURCE_TREE=$2
|
||||
|
||||
XCOMM Set which system we are on
|
||||
|
||||
BUILDSYSTEM=$(uname)
|
||||
|
||||
XCOMM Set system
|
||||
|
||||
if [ $BUILDSYSTEM = "AIX" ]
|
||||
then
|
||||
PLATFORM=aix
|
||||
elif [ $BUILDSYSTEM = "SunOS" ]
|
||||
then
|
||||
PLATFORM=sun
|
||||
elif [ $BUILDSYSTEM = "UNIX_SV" ]
|
||||
then
|
||||
PLATFORM=usl
|
||||
elif [ $BUILDSYSTEM = "UNIX_System_V" ]
|
||||
then
|
||||
PLATFORM=uxp
|
||||
elif [ $BUILDSYSTEM = "OSF1" ]
|
||||
then
|
||||
PLATFORM=dec
|
||||
else # Build system = HP
|
||||
PLATFORM=hp-ux
|
||||
fi
|
||||
|
||||
if [ $PLATFORM = "aix" ]
|
||||
then
|
||||
USER=`/bin/whoami`
|
||||
elif [ $PLATFORM = "sun" -o $PLATFORM = "uxp" ]
|
||||
then
|
||||
USER=`/usr/ucb/whoami`
|
||||
else
|
||||
USER=`/usr/bin/whoami`
|
||||
fi
|
||||
|
||||
if [ $USER != "root" ]
|
||||
then
|
||||
echo ""
|
||||
echo "You must be root to run this script"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "updateCDE: This script re-installs bits from the daily build trees."
|
||||
echo ""
|
||||
|
||||
sleep 2
|
||||
|
||||
PATH=/bin:/usr/bin:/etc:/usr/bin/X11:
|
||||
export PATH
|
||||
|
||||
XCOMM Change the run level to kill all dtlogins
|
||||
|
||||
if [ $PLATFORM = "hp-ux" ]
|
||||
then
|
||||
/etc/telinit 2
|
||||
elif [ $PLATFORM = "sun" ]
|
||||
then
|
||||
CDE_INSTALLATION_TOP/config/dtlogin.rc stop
|
||||
fi
|
||||
|
||||
TOOL_DIR=$SOURCE_TREE/admin/IntegTools/updateTools
|
||||
DB_TOOL_DIR=$SOURCE_TREE/admin/IntegTools/dbTools
|
||||
export TOOL_DIR DB_TOOL_DIR
|
||||
|
||||
|
||||
XCOMM kill any active Common Desktop Clients
|
||||
|
||||
echo "Stopping any Common Desktop Clients"
|
||||
$TOOL_DIR/kfork.dtclients
|
||||
$TOOL_DIR/kfork.dtclients
|
||||
|
||||
XCOMM Send all of the parameters to installDT
|
||||
|
||||
$DB_TOOL_DIR/installCDE $*
|
||||
|
||||
XCOMM Change run level to restart dtlogin
|
||||
|
||||
if [ $PLATFORM = "hp-ux" ];
|
||||
then
|
||||
/etc/telinit 5
|
||||
elif [ $PLATFORM = "sun" ]
|
||||
then
|
||||
CDE_INSTALLATION_TOP/config/dtlogin.rc start
|
||||
fi
|
||||
|
||||
echo "Done updating Common Desktop Bits."
|
||||
|
||||
echo "Updated Common Desktop Bits on: " > /etc/motd
|
||||
date >> /etc/motd
|
||||
echo "via the $TOOL_DIR/updateCDE script" >> /etc/motd
|
||||
echo "" >> /etc/motd
|
||||
|
||||
|
||||
XCOMM ################### eof #################
|
||||
Loading…
Add table
Add a link
Reference in a new issue