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

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

View File

@@ -0,0 +1,22 @@
XCOMM $XConsortium: Imakefile /main/5 1996/07/24 14:15:31 drk $
/* *
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP)
TARGETS = dtconfig dtlogin.rc \
dtrc dtrc.dtlogin_st dtrc.getty_wait dtrc.graph_conf
AllTarget($(TARGETS))
CppScriptTarget(dtconfig,dtconfig.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(dtlogin.rc,dtlogin.rc.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(dtrc,dtrc.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(dtrc.dtlogin_st,dtrc.dtlogin_st.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(dtrc.getty_wait,dtrc.getty_wait.src,$(LOCAL_CPP_DEFINES),)
CppScriptTarget(dtrc.graph_conf,dtrc.graph_conf.src,$(LOCAL_CPP_DEFINES),)

View File

@@ -0,0 +1,163 @@
XCOMM!/sbin/sh
XCOMM $XConsortium: dtconfig.src /main/1 1996/07/24 11:39:47 drk $
XCOMM
XCOMM This version of the CDE dtconfig script is for use in the HP-UX
XCOMM operating environment.
XCOMM
XCOMM Common Desktop Environment
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1993-1994,1996 International Business Machines Corp.
XCOMM (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1993-1994,1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
XCOMM
XCOMM This script can be run after CDE installation to configure CDE within
XCOMM the host platforms operating environment. For example, when auto-start
XCOMM is selected, the CDE desktop login window will be displayed at end of the
XCOMM workstation's power up boot cycle.
XCOMM
XCOMM Location: CDE_INSTALLATION_TOP/bin/dtconfig
PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
export PATH
mode=$1
arg_count=$#
prg_name=$0
Message()
{
XCOMM Message() - display message from dtconfig.cat
XCOMM $1 - message id
XCOMM $2 - fallback message text
if [ -x $DTDSPMSG ]; then
NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat:/usr/dt/lib/nls/msg/C/%N.cat $DTDSPMSG -s 30 dtconfig $1 "$2" "$3"
echo " "
else
echo "$2"
fi
}
usage_error() {
echo " "
Message 1 " CDE configuration utility"
echo " "
Message 2 " $prg_name -d (disable auto-start)" $prg_name
Message 3 " $prg_name -e (enable auto-start)" $prg_name
Message 4 " $prg_name -kill (kill dtlogin)" $prg_name
Message 5 " $prg_name -reset (reset dtlogin)" $prg_name
Message 6 " $prg_name -p (printer action update)" $prg_name
echo " "
}
DTDSPMSG=/usr/dt/bin/dtdspmsg
RC_MASTER=/sbin/init.d/dtlogin.rc
RC_CONFIG_DESKTOP=/etc/rc.config.d/desktop
VUERC=/usr/vue/bin/vuerc
set `id`
if [ $1 != "uid=0(root)" ]; then
Message 7 "$prg_name: this script must be run as root" $prg_name
exit 1
fi
if [ $arg_count -ne 1 ]; then
echo " "
XCOMM
XCOMM Display error message for too many arguments
XCOMM
if [ $arg_count -gt 1 ]; then
Message 8 "Usage: Too many arguments"
XCOMM
XCOMM Display error message for NULL arguments passed
XCOMM
elif [ $arg_count -eq 0 ]; then
Message 9 "Usage: Needs one argument"
fi
usage_error
exit 1
fi
rc_master_check() {
if [ ! -x $RC_MASTER ]; then
Message 10 "option failed"
Message 11 "could not execute $RC_MASTER" $RC_MASTER
exit 1
fi
}
case "$mode" in
'-d')
(
if [ -f $RC_CONFIG_DESKTOP ]; then
DESKTOP=""
. $RC_CONFIG_DESKTOP
if [ CDE = "$DESKTOP" ]; then
echo "# CDE Desktop disabled `date`" >$RC_CONFIG_DESKTOP
fi
fi
)
Message 14 "done"
Message 15 "desktop auto-start disabled."
;;
'-e')
#if (OSMAJORVERSION <= 10) && (OSMINORVERSION < 20)
if [ -f /tcb/files/auth/system/default ]; then
Message 25 "CDE can not be enabled on a trusted system"
Message 26 "unable to enable desktop auto-start"
exit 1
fi
#endif
echo "# CDE Desktop enabled `date`" >$RC_CONFIG_DESKTOP
echo "DESKTOP=CDE" >>$RC_CONFIG_DESKTOP
Message 14 "done"
Message 20 "desktop auto-start enabled."
;;
'-kill')
rc_master_check
$RC_MASTER stop
Message 14 "done"
Message 21 "dtlogin kill complete."
;;
'-reset')
rc_master_check
$RC_MASTER reset
Message 14 "done"
Message 22 "dtlogin config resources reloaded."
;;
'-p')
rc_master_check
$RC_MASTER update_printers
Message 14 "done"
Message 23 "printer action update is complete"
;;
*)
echo " "
Message 24 "Usage:"
usage_error
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,153 @@
XCOMM!/sbin/sh
XCOMM $XConsortium: dtlogin.rc.src /main/1 1996/07/24 11:40:29 drk $
XCOMM
XCOMM This version of the dtlogin.rc script can be used on the HP-UX
XCOMM operating system to initiate 1DE tasks such as starting the dtlogin
XCOMM process.
XCOMM
XCOMM Common Desktop Environment
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1993-1994,1996 International Business Machines Corp.
XCOMM (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1993-1994,1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
XCOMM
XCOMM When placed in the /sbin/rc3.d directory and named appropriately, such as
XCOMM "S990dtlogin", this script will automatically start the dtlogin window
XCOMM after the HP-UX system boots to its multi-user level.
XCOMM
XCOMM This script is also called indirectly by the CDE dtconfig command.
PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
export PATH
mode=$1
case "$mode" in
'start_msg')
echo "Start CDE login server"
exit 0
;;
'stop_msg')
echo "Stop CDE login server"
exit 0
;;
esac
usage_error() {
echo " $0 start (start dtlogin process)"
echo " $0 stop (stop dtlogin process)"
echo " $0 reset (reset dtlogin process)"
echo " $0 update_printers (update print actions)"
echo " "
}
if [ ! -d /usr/bin ]; then # /usr not mounted
exit 1
fi
set `id`
if [ $1 != "uid=0(root)" ]; then
echo "$0: must be run as root"
exit 1
fi
XCOMM update_printers()
XCOMM
XCOMM Add print actions to workstation's database for all printers known
XCOMM to this workstation if action is not already present in the database.
update_printers() {
if [ -x /usr/dt/bin/dtprintinfo ]; then
/usr/dt/bin/dtprintinfo -populate
fi
}
XCOMM
XCOMM Find login server pid from the process tree
XCOMM
login_server_pid() {
XCOMM In following grep for "dtlogin" processes, explictly exclude any matches
XCOMM on this shell file named "dtlogin.rc"
#if (OSMAJORVERSION < 10) && (OSMINORVERSION < 20)
ps -u 0 -l | grep -v dtlogin. | grep dtlogin |
cut -c1-24 | awk '{print $4 " " $5}' |
while read pid ppid; do
#else
XCOMM
XCOMM Use the new XPG4 features of "ps" (also "-C cmdlist" ) to get the pids.
XCOMM
UNIX95=1 ps -C dtlogin -o pid= -o ppid= |
while read pid ppid; do
#endif
if [ "$(ps -p $ppid | grep dtlogin)" = "" ]; then
print "$pid"
break
fi
done
}
case "$mode" in
'start')
if [ -f /etc/rc.config ]; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
if [ "CDE" != "${DESKTOP:-}" ]; then
exit 2
fi
update_printers
if [ -x CDE_INSTALLATION_TOP/bin/dtrc ]; then
trap "" 1
CDE_INSTALLATION_TOP/bin/dtrc &
elif [ -x CDE_INSTALLATION_TOP/bin/dtlogin ]; then
CDE_INSTALLATION_TOP/bin/dtlogin -daemon
fi
;;
'stop')
XCOMM get dtlogin pid
dtlogin_pid=`login_server_pid`
XCOMM kill dtlogin process
if [ "$dtlogin_pid" != "" ] ; then
kill $dtlogin_pid
fi
;;
'reset')
XCOMM get dtlogin pid
dtlogin_pid=`login_server_pid`
XCOMM reset dtlogin process
if [ "$dtlogin_pid" != "" ] ; then
kill -HUP $dtlogin_pid
fi
;;
'update_printers')
update_printers
;;
*)
usage_error
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,72 @@
XCOMM!/sbin/sh
XCOMM $XConsortium: dtrc.dtlogin_st.src /main/1 1996/07/24 11:41:05 drk $
XCOMM
XCOMM This version of the CDE dtconfig script is for use in the HP-UX
XCOMM operating environment.
XCOMM
XCOMM Common Desktop Environment
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1993-1994,1996 International Business Machines Corp.
XCOMM (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1993-1994,1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
XCOMM
XCOMM This script runs dtlogin.
XCOMM
XCOMM Location: CDE_INSTALLATION_TOP/config/dtrc.d/90_dtlogin_st
PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
export PATH
XCOMM Default version
DTLOGIN=CDE_INSTALLATION_TOP/bin/dtlogin
VL_ARGS=""
if [ -x "$DTLOGIN" ]; then
exec $DTLOGIN $VL_ARGS </dev/null >/dev/null 2>&1
else
XCOMM
XCOMM Note: This path occurs if dtlogin can not be found or
XCOMM is not executable...
XCOMM
XCOMM
XCOMM Wait for the console getty (if any) to start.
XCOMM
for COUNT in 1 2 3 4 5
do
TMP=`ps -tconsole | fgrep getty`
if [ $? -eq 0 ]; then
GETTY=true
break
fi
sleep 1
done
XCOMM
XCOMM Print a message to the console.
XCOMM
echo "" > /dev/console
DTRC=CDE_INSTALLATION_TOP/bin/dtrc
echo "The desktop can not be started. (See $DTRC)" > /dev/console
XCOMM
XCOMM If a getty is not already running on the console, start one.
XCOMM
if [ -z "$GETTY" ]; then
exec /etc/getty console console
fi
fi
XCOMM ################## eof #####################

View File

@@ -0,0 +1,40 @@
XCOMM!/sbin/sh
XCOMM $XConsortium: dtrc.getty_wait.src /main/1 1996/07/24 11:41:57 drk $
XCOMM
XCOMM This version of the CDE dtconfig script is for use in the HP-UX
XCOMM operating environment.
XCOMM
XCOMM Common Desktop Environment
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1993-1994,1996 International Business Machines Corp.
XCOMM (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1993-1994,1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
XCOMM
XCOMM This script waits for the console getty to start. This prevents dtlogin
XCOMM from running an X server that would grab the display before the rc
XCOMM checklist is complete.
XCOMM
XCOMM Location: CDE_INSTALLATION_TOP/config/dtrc.d/10_getty_wait
XCOMM
XCOMM Wait for the console getty to start.
XCOMM
PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
export PATH
let count=0
while [ $count -lt 60 ]
do
TMP=`ps -tconsole | fgrep getty`
if [ $? -eq 0 ]; then
GETTY=true
break
fi
sleep 2
let count=count+1
done

View File

@@ -0,0 +1,51 @@
XCOMM!/sbin/sh
XCOMM $XConsortium: dtrc.graph_conf.src /main/1 1996/07/24 11:42:43 drk $
XCOMM
XCOMM This version of the CDE dtconfig script is for use in the HP-UX
XCOMM operating environment.
XCOMM
XCOMM Common Desktop Environment
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1993-1994,1996 International Business Machines Corp.
XCOMM (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1993-1994,1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
XCOMM
XCOMM This script:
XCOMM - copies CDE_INSTALLATION_TOP/config/Xservers to
XCOMM CDE_CONFIGURATION_TOP/config if it does not yet exist,
XCOMM - uses ioscan to find out if the system has a graphics card
XCOMM installed,
XCOMM - comments out the "Local" entry in the Xservers file if it
XCOMM does not,
XCOMM
XCOMM Location: CDE_INSTALLATION_TOP/config/dtrc.d/20_graph_conf
PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
export PATH
XCOMM
XCOMM create CDE_CONFIGURATION_TOP/config/Xservers if it does not exist
if [ ! -f CDE_CONFIGURATION_TOP/config/Xservers ]; then
cp CDE_INSTALLATION_TOP/config/Xservers \
CDE_CONFIGURATION_TOP/config/Xservers
fi
XCOMM
XCOMM comment out the Local entry if there is no graphics card
if [[ -z `ioscan -kC graphics` ]]; then
TAB=" "
TS="[${TAB} ]"
sed -e "s:^${TS}*\*${TS}${TS}*Local:# * Local:" \
< CDE_CONFIGURATION_TOP/config/Xservers \
> /tmp/Xservers.tmp
cp /tmp/Xservers.tmp CDE_CONFIGURATION_TOP/config/Xservers
rm -f /tmp/Xservers.tmp
fi
XCOMM ################## eof #####################

View File

@@ -0,0 +1,97 @@
XCOMM!/sbin/sh
XCOMM $XConsortium: dtrc.src /main/6 1996/07/24 14:15:50 drk $
XCOMM ################################################################
XCOMM
XCOMM dtrc
XCOMM
XCOMM Common Desktop Environment
XCOMM
XCOMM Shell script for initialization of the Common Desktop Environment
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1993-1994,1996 International Business Machines Corp.
XCOMM (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1993-1994,1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
XCOMM
XCOMM ************** DO NOT EDIT THIS FILE **************
XCOMM
XCOMM CDE_INSTALLATION_TOP/bin/dtrc is a factory-default file and will
XCOMM be unconditionally overwritten upon subsequent installation.
XCOMM Modification is discouraged.
XCOMM
XCOMM ################################################################
#define HASH #
PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
export PATH
DTRC_D=CDE_INSTALLATION_TOP/config/dtrc.d
DTLOGIN=CDE_INSTALLATION_TOP/bin/dtlogin
VL_ARGS=""
if [ -d $DTRC_D ]
then
HASH
HASH run the scripts in CDE_INSTALLATION_TOP/config/dtrc.d
HASH in lexical (ls) order
HASH
ls $DTRC_D/[0-9][0-9]_* |
while read DTRCFILE
do
$DTRCFILE
done
else
HASH
HASH dtrc.d directory does not exist
HASH
if [ -x "$DTLOGIN" ]
then
exec $DTLOGIN $VL_ARGS </dev/null >/dev/null 2>&1
else
HASH
HASH Note: This path occurs if dtlogin can not be found or
HASH is not executable...
HASH
HASH
HASH Wait for the console getty (if any) to start.
HASH
for COUNT in 1 2 3 4 5
do
TMP=`ps -tconsole | fgrep getty`
if [ $? -eq 0 ]; then
GETTY=true
break
fi
sleep 1
done
HASH
HASH Print a message to the console.
HASH
echo "" > /dev/console
DTRC=CDE_INSTALLATION_TOP/bin/dtrc
echo "The desktop can not be started. (See $DTRC)" > /dev/console
HASH
HASH Start getty on the console if it isn't running already.
HASH
if [ -z "$GETTY" ]; then
exec /etc/getty console console
fi
fi
fi
XCOMM ################## eof #####################